Can't get partnerServerUrl in sandbox

  • 1
  • Problem
  • Updated 2 weeks ago
  • In Progress
Hi, 

I can't get the partner url in my sandbox.

I've tried merge syntax: 
'&serverUrl={{$Api.Partner_Server_Url}}'
and populates an empty string and Javascript :
'&serverUrl='+sforce.connection.partnerServerUrl
 and populates "undefined"

I'm using skuid for salesforce 11.0.5
In production I have the same version and it works.
Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb

Posted 3 weeks ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
To confirm, you have the same version of Skuid in both Sandbox and Production, and you are using the same Skuid Page (in Visualforce I'm assuming) in both environments, but in Sandbox, sforce.connection.partnerServerUrl || {{$Api.Partner_Server_Url}} is showing up as undefined ?
Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb
Yes, That's the case. 

the weird thing is that if I put sforce.connection.partnerServerUrl in the chrome console it shows the url.

The code I'm using is:

var params = arguments[0];
var url = 'https://composer.congamerge.com'
    + '?sessionId={{$Api.Session_Id}}'
//  + '&serverUrl={{$Api.Partner_Server_Url}}'
    + '&serverUrl='+sforce.connection.partnerServerUrl 
    + '&id={{Id}}'
    + '&ReportVar={{Id}}'
    + '&QVar0Id={{$Label.OSIOrderContactID}}?pv0={{Id}}'
    + '&QVar1Id={{$Label.OSIOrderContacsEmail}}?pv0={{Id}}'
    + '&QueryId=[Message]{{$Label.QueryLastUpdate}}?pv0={{Id}},'
    + '[FirstOrderContact]{{$Label.FirstOrderContact}}?pv0={{Id}},'
    + '[Site]{{$Label.Site}}?pv0={{{Opportunity__r.Id}}},'
    + '[Contacts]{{$Label.Conga_Query_OSI_OrderContacts_mail_name_role}}?pv0={{Id}},'
    + '[Owner]{{$Label.UserQuery}}?pv0={{{Owner__c}}}'
    + '&EmailToId={QVar0}'
    + '&EmailAdditionalTo={QVar1}'
    + '&EmailCC={{$Model.User.data.0.Email}}'
    + '&CongaEmailTemplateID={{$Label.Conga_Email_Template_OrderUpdateV3}}'
    + '&EmailRelatedToId={{Id}}'
    + '&LG4=2'
    + '&AC0=1'
    + '&DS7=2';
var merges = skuid.$('<div>').html(params.model.mergeRow(params.row,url));
alert (merges.text());

All the merges are doing it correctly except for the partner url.
Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb
Any idea?