Skip to main content

Hello!

I’m using javascript to populate a url and I need to replicate {!$Api.Partner_Server_URL_160} using a snippet.

I’ve been using sforce.connection.partnerServerUrl in the snippet but this doesn’t specify the version (16).

Any thoughts? Cheers!

Louis

To clarify - the output I’m getting is:

https://XXXXXXXX–skuid.eu5.visual.force.com/services/Soap/u/31.0/00D24000000JXVQ

Whereas I need this:

https://XXXXXXXXX.my.salesforce.com/services/Soap/u/16.0/00D24000000JXVQ

Cheers!


And here’s my snippet:


var params = argumentst0], $ = skuid.$; // Get the Ids of the selected items as an Array var idsArray = skuid.$.map(argumentst0].list.getSelectedItems(),function(item){ return item.row.Id; }); // STEP 1: CHANGE THE NEXT LINE TO THE TYPE OF RECORDS YOU'RE ACCESSING ON THE VIEW // var idArray = {!GETRECORDIDS( $ObjectType.Lead )}; // STEP 2: CHANGE THE NEXT LINE TO THE API NAME OF THE FIELD THAT CONTAINS THE POINTMERGE URL var urlFieldName="Conga_Batch_Profit__c"; // DO NOT MODIFY ANYTHING BELOW THIS POINT ******************** // YOU MAY PASS UP TO 50 IDS var CongaURL = "https://conductor.congamerge.com" + "?MOID=" + idsArray + "&amp;SessionId=" + skuid.utils.userInfo.sessionId + "&amp;ServerUrl=" + <b>sforce.connection.partnerServerUrl</b> + "&amp;UrlFieldName=" + urlFieldName; window.open( CongaURL, "Conga", "width=700,height=450,menubar=0" );<br>

Take a look here:  http://help.skuidify.com/m/11720/l/187263-global-merge-variables-functions

Key graph:  

$Api.Partner_Server_Urls: A map containing all Partner Server Urls for past API versions of Salesforce starting with API v3, keyed by the integer version of the Api. Example: using $Api.Partner_Server_Urls.29 would return the same thing as $Api.Partner_Server_Url above, whereas $Api.Partner_Server_Urls.3 would return something likehttps://skuid.na11.visual.force.com/services/Soap/u/3.0/00DG0000000XHQa"  

Available in JavaScript via sforce.connection.partnerServerUrls.

One thing that tripped me up recently was that your call needs to be version 16,  not to version 160. 


sforce.connection.partnerServerUrls.16

Louis as you’ve noted, this URL is a Visualforce server URL, which is different from the .salesforce.com Domain partner server URL. I think that this is sometimes a problem, sometimes not. I seem to recall that if Conga needs to access Reports, then it needs the .salesforce.com URL and a .salesforce.com Session Id, but if Conga just uses SOQL to perform its queries, then it can use the Visualforce Server URL’s and Session Ids.


Hi Rob, Zach. Thanks for that. I’m having a few issues with the conga conductor tool and just wanted to remove Skuid as a possible source for those issues - which I’ve now done. It looks like the version and the url don’t have a bearing. I’m now working with Conga as we think the issue lies with them.

Cheers!


Louis, were you able to resolve this with Conga?  Having similar issues over here.


Hi Peter,

Yes, I managed to rule out Skuid as causing the issue and then shunted it over to Conga by discussing this with them directly. I updated to the latest version of Conga Conductor (it’s in beta) and haven’t had any issues since. Might be worth punting this over to them to take a look?