Should there be any difference between {!API.Session_ID}, skuid.utils.userInfo.sessionId and sforce.connection.sessionId?
I am calling conga merge composer and keep getting the SFDC login page during the composing process. The conga process does work in the end - but after I login again.
My code:
var partnerServer = sforce.connection.partnerServerUrls[8];<br><br>var hcURL1 = '<a target="_blank" rel="nofollow" href="https://www.appextremes.com/apps/Conga/Composer.aspx'" title="Link https//wwwappextremescom/apps/Conga/Composeraspx">https://www.appextremes.com/apps/Conga/Composer.aspx'</a>+ '?sessionId='+sforce.connection.sessionId+<br> '&serverUrl='+partnerServer+<br> '&id='+model1[0].Id+<br> '&CongaEmailTemplateId=a4Z500000004F01'+<br> '&reportid=[office]00O50000003QupQ?pv0='+model1[0].Id+<br> ',[spouse1]00O50000003QrN4?pv0='+model1[0].Id+<br> ',[spouse2]00O50000003QrNE?pv0='+model1[0].Id+<br> '&EmailToId='+model1[0].Id+<br> '&EmailFromId='+model1[0].Adviser_Id__c+<br> '&DV0=<a target="_blank" rel="nofollow" href="https://stuff.betterstfuff.com/?sf='+model1[0].Id" title="Link https//apphonestconversationscom/sfmodel10Id">https://stuff.betterstfuff.com/?sf='+model1[0].Id</a>+<br> '&DS7=2&LG4=1&LG1=+My+Email+1';
Both return the same Session Id (a Visualforce Session Id). I seem to recall that other users have had trouble in the past trying to launch Conga from Skuid with Conga’s Report-driven document merge approach, as opposed to the Conga Queries document merge approach. The reason is that the Report-driven approach requires a “Salesforce” Session Id, as opposed to a Visualforce Session Id. Because Skuid runs in Visualforce, Skuid gets a Visualforce Session Id, which seems to work for Conga Queries / SOQL-query based merges.
I searched the Community to try to find an example of someone succeeding with a Report-based Conga query launched from Skuid, but haven’t found one yet.
Zach, thank you for the response. Is there an API to call a SF button via Javascript?
For this:
![]()
Peter, will the button included on the Skuid Page? If so, you could give the Button a Unique Id and then trigger a click on it via JavaScript, e.g. via
skuid.$(‘#MyButton’).click();
or
skuid.$(‘#MyButton’).trigger(‘click’);
If you don’t want the button to be included on the Skuid Page at all, then no, there’s currently not a documented Skuid API for doing this, but we could potentially add that if it was a significant need.
Thanks! As an FYI here is how I solved this issue… feels pretty hacky but it works!
var partnerServerExternal = sforce.connection.partnerServerUrls[24];<br />var partnerServer = partnerServerExternal.replace("mycompany--skuid.na1.visual.force.com","mycompany.my.salesforce.com");<br /> <br /> var URL = '<a href="https://www.appextremes.com/apps/conga/pm.aspx'+" rel="nofollow" target="_blank" title="Link https//wwwappextremescom/apps/conga/pmaspx">https://www.appextremes.com/apps/conga/pm.aspx'+</a> <br /> '?sessionId='+sforce.connection.sessionId+<br /> '&serverUrl='+partnerServer+...
Interesting! So you used the same Session Id, you just used a Server URL on the *.salesforce.com Domain tree, rather than on the *.force.com tree, and it worked — that is very helpful. Good to know.