Drawloop Button syntax

  • 2
  • Idea
  • Updated 3 years ago
  • (Edited)
We've been working a lot with integrating Drawloop buttons into some pages lately, and one of the difficulties we came across was passing the Session ID parameter into the drawloop button, as Skuid pages operate with a different session Id to what would normally be passed into a button from a standard salesforce page layout.

We managed to bypass this by calling the record id of the custom salesforce button which contains the logic that drawloop wants.

This also allowed us to run skuid actions (like saving models) prior to calling the button, which previously couldn't be done using the standard salesforce button action in a page title component.

So....essentially the url parameter you need to call is this:

/servlet/servlet.Integration?lid=00b24001234HCC2AAO&eid={{Id}}&ic=1
  • where the 'lid' parameter is the record id of the button being called (which you can obtain by going into Salesforce setup, finding the object, and clicking on the button and copying its id from its url.)
  • and {{Id}} is the record id being passed from the model in your skuid page
And your actual drawloop button follows the syntax defined by drawloop support:

/apex/loop__looplus?eid={!Quote__c.Id}&sessionid={!$Api.Session_ID}&ddpIds=a0H240001230IgE&autorun=true&retURL=/{!Quote__c.OpportunityId__c}

If you were to click this button from a standard salesforce page, you will notice a url like the 'servlet/servlet..." one above which exists temporarily before turning into the url which passes the session id - so all you are really doing from skuid is calling that temporary url.

This should also work (although we haven't tested it) if you are following the guidelines from drawloop buttons and salesforce lightning - all the logic is contained within the salesforce button (rather than the skuid button) so it should behave as expected.

I don't believe there are any security implications with calling "/servlet/servlet.Integration......" however if anyone knows of any could you please let me know here.

Hope that helps anyone having issues with Drawloop buttons and session ids.

Greg
Photo of Greg Jarrett

Greg Jarrett

  • 3,496 Points 3k badge 2x thumb

Posted 3 years ago

  • 2

Be the first to post a reply!