Fetch Record Action ID dunamically and pass a parameter to URL Link

Certified Associate Developer

Hello,

I'm currently using a rule expression to get my record site URL called: rule!CWM_getRecordSiteURL.

The thing is that i have and "update" record action and need to pass the action ID or GUID as a parameter in an email taks inside a process model which sends an URL link for the user to update his record.

I'm using the follwing expression:

=substitute(rule!CWM_getRecordSiteURL(icwmrequestid: pv!iCWMRequestId),"summary","actions/isBP4AQ2nCVOfYnN-GDJG5WQm_gfib-jO3dNBkdp_wot7_MdLyp9GmtPlgy")

Being "actions/isBP4AQ2nCVOfYnN-GDJG5WQm_gfib-jO3dNBkdp_wot7_MdLyp9GmtPlgy" my record action ID but, everytime i switch environments from DEV to TEST or PROD the record action ID changes and have to reconstruct the expression with the new ID over and over again.

Is there any way to make this process dynamic or the fetch the Record Action ID without having to hardcode it?

Thanks in advance! 

  Discussion posts and replies are publicly visible

Parents
  • I don't believe it is possible to dynamically generate the link to a specific related action - have you considered linking directly to the summary view and including a related action shortcut link there? It would be one more click, but then you wouldn't need to store the URL for each action individually.

  • 0
    Certified Associate Developer
    in reply to Peter Lewis

    Thanks for the reply Peter.

    Yes, i considered linking directly to the summary view and include a related action shortcut link but, the desired approach was to get that link dynamically, pass it as a parameter in an email task so that the user could directly receive the precise link to his record. The latest solution i found for this matter was saving that specific action ID or GUID in a constant and replace all the raw instances of it. Then, when switching environments i just need to change it in one place. 

    thanks anyways for the good feedback! 

Reply
  • 0
    Certified Associate Developer
    in reply to Peter Lewis

    Thanks for the reply Peter.

    Yes, i considered linking directly to the summary view and include a related action shortcut link but, the desired approach was to get that link dynamically, pass it as a parameter in an email task so that the user could directly receive the precise link to his record. The latest solution i found for this matter was saving that specific action ID or GUID in a constant and replace all the raw instances of it. Then, when switching environments i just need to change it in one place. 

    thanks anyways for the good feedback! 

Children
No Data