Redirect to URL row action not processing merge syntax for ui-only text field

  • 1
  • Idea
  • Updated 2 years ago
  • Under Consideration
Row action on a table is "Redirect to URL' with a url of:
/apex/skuid__ui?page={{PurposePage}}&id={{Id}}
Here's the data in the table's model for the row:


Here's the url that's opening:
/apex/skuid__ui?page=&id=a0R1a000001fyuSEAQ

PurposePage is a ui-only text field that I'm populating with a custom field renderer on Interaction_Purpose__c;

Does the merge syntax for the action process when the table renders, instead of when the action is clicked?

This may be related to: https://community.skuid.com/skuid/topics/mass-action-redirect-to-url-not-processing-merge-syntax-9ak...
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,260 Points 5k badge 2x thumb
Matt~

What happens when you remove the {{ }} around the page name so it's /apex/skuid__ui?page=PurposePage&id={{Id}}?

Thanks!
Karen
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Karen,

That would work if the name of the page was "PurposePage", but the name of the page is the value of the PurposePage ui-only field on the row.

Without the braces, I will just be redirected to a nonnexistant page called PurposePage, correct?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Matt. If you add the UI Only field into the table do you get data? 

Also,  if you inspect the row actions in the table,  you should be able to see what the URL value is set on for the button.  What do you see there?

I'm pretty sure this URL is constructed at table build time,  rather than when the button is clicked. 

I am also curious to know when the merge syntax in the action button gets processed. 
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I was able to solve it by calling .render() on the table after the values were set. Which seems to mean that the merge syntax is processed when the table is rendered, not when the row action is clicked.

Any chance we can get that changed?
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,260 Points 5k badge 2x thumb
Matt~

Glad you were able to figure it out! I will change this to an idea under consideration for the devs to see if that can be changed. 

Thanks!
Karen