I'm trying to build a custom action button that links to a page with a query string URL.

enter image description here

I've tried "?Project={ItemTitle} but that doesn't work.

I can get the ID by adding "?Project={ItemId}" but how can I get the item title?


The replaceable variables are very limited. The only way I was able to do something similar was to use a really long javascript snip that would grab the info from the page. That text can be pretty long - hard to format but it can be done. Here's a description of how I added a mailto item to a custom action - I was able to get the title by diving into the dom:

javascript:window.location='mailto:?subject='+encodeURIComponent(document.getElementById({SelectedItemId}).firstChild.innerHTML)+'&body='+encodeURIComponent('\n\nTitle: '+document.getElementById({SelectedItemId}).firstChild.innerHTML+'\n')+encodeURIComponent('Link: <'+document.getElementById({SelectedItemId}).firstChild.getAttribute('href')+'>');

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.