calvin peters 6/30/2024 11:59:50 PM I have loaded up a sample app from the repository TD offers and made a simple update to help walk you through this if you wish.
I just need an email address to add someone as a user to give you the visual.
Essentially, the <a> tag from the dev console gets modified with URLEncode(RecordId()) to replace the navigational Id found in the custom button The "&back=...some-gobble=de-gook..." gets replaced with ...' &back="&BackURL() ' So the formula URL end up looking something like this from the test app: "https://www.teamdesk.net/secure/db/96383/edit.aspx?b=1831615&id="&URLEncode(RecordId())&"&back="&BackURL()
Where the button I created was saved and coded by TD as " b=1831615 " The URL string is excaped after ' "id=" ' then insert ' &URLEncode(RecordID())& ' with both ampersands, one at each end... Then restart the URL string with quotes like ' "&back=" ' and insert the function ' BackURL() ' to finish the string
RecordID() function will return the root row Id of the database record for whatever record the form is displaying at the time. BackURL() function contstructs the back navigation string and places it at the end of the URL navigation string in your URL address bar based on whatever record the form happens to be displaying at the time.
The thing I had difficulty with, and still do sometimes, is remembering the extra ampersands that are required between string and function inserts...like the one after ' id="& ' and the double ampersand after the URLEncode()&"&back="&... Without those it just doesn't work...
So this will trigger the hidden custom button that I setup in this temporary app and when completed will return to the original record it started from...just like the Custom Navigation button that it is triggering was oded to do.
Shoot me an email here and I'll set it up as a user in this app if you need to see it work for clarity sake. I'm very much that way when it comes to understanding this stuff.
If you have it figured out from this explanation and don't need access. let me know here and I'll unload the app I modified.
Happy coding :)
|