How to use sforce.connection.partnerServerUrls

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I'm stuck!  Can I get an example on how to properly use sforce.connection.partnerServerUrls.?

The documentation and a user group post appears to say I can call sforce.connection.partnerServerUrls.16



I have also tried:

var num = 8;
var n = num.toString();
var partnerServer = sforce.connection.partnerServerUrls.n;
url=....+partnerServer+...

But I get undefined.

Thanks!
Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb
  • sick of this problem!

Posted 4 years ago

  • 1
Photo of Moshe Karmel

Moshe Karmel, Champion

  • 8,646 Points 5k badge 2x thumb
Try using array syntax, like so "sforce.connection.partnerServerUrls[16]".
Photo of Peter Herzog

Peter Herzog

  • 1,664 Points 1k badge 2x thumb
AH!  Yes!  Thank you. 

I like supplying the low hanging fruit. 
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
And we love the low hanging fruit!