Passing Id from Skuid page to Conga Composer error

  • 2
  • Problem
  • Updated 1 month ago
  • Solved
  • (Edited)
Using Java Snippet for Custom Button to open Conga Merge 8.   Everything is working good except for passing the Id over.   If I hardcode an Id it works, but using {{Id}} throws a conga error "id parameter not valid etc...."  Tried using the Timeline__c.Id (custom object) but still the same result.   I am using a snipped so I can specify that the Conga window opens in smaller size window.  Any help or suggestions would be greatly appreciated.  My code is below:

var params = arguments[0],
$ = skuid.$;

var partnerServer = sforce.connection.partnerServerUrls[8];
var CongaURL = "https://composer.congamerge.com"+
"?sessionId="+sforce.connection.sessionId+"&serverUrl="+partnerServer+
"&id={{Id}}"+"&ofn={{Name}}";
window.open( CongaURL, "CongaM", "height=600, width=600, menubar=0" );
Photo of Ann Kukich

Ann Kukich

  • 1,316 Points 1k badge 2x thumb

Posted 1 year ago

  • 2
Photo of Paul Heald

Paul Heald

  • 420 Points 250 badge 2x thumb
The following snippet should solve your problem replace lead with the Timeline__c model name

var params = arguments[0],
$ = skuid.$;

var partnerServer = sforce.connection.partnerServerUrls[8];
var CongaURL = "https://composer.congamerge.com"+
"?sessionId="+sforce.connection.sessionId+"&serverUrl="+partnerServer+"&id="+skuid.$M('Lead').data[0].Id +"&ofn="+skuid.$M('Lead').data[0].Name;
window.open( CongaURL, "CongaM", "height=600, width=600, menubar=0" );
Photo of Ann Kukich

Ann Kukich

  • 1,316 Points 1k badge 2x thumb
This worked perfectly!   Thank you Paul
Photo of Ann Kukich

Ann Kukich

  • 1,316 Points 1k badge 2x thumb
Here is the snippet code that worked for me.   We have been using this without a problem for at least a year.   At first I was using sf reports to pull in fields from another table, but that would not work.   Changed the reports to Conga Queries and all is good.   'Timeline' is the name of our Custom Salesforce object (table).



var params = arguments[0],
$ = skuid.$;

var partnerServer = sforce.connection.partnerServerUrls[8];
var CongaURL = "https://composer.congamerge.com"+
"?sessionId="+sforce.connection.sessionId+"&serverUrl="+partnerServer+
"&id="+skuid.$M('Timeline').data[0].Id+"&ofn="+skuid.$M('Timeline').data[0].Name+"&TemplateId=a070f00000oQWKV"+"&TemplateGroup=TLS"+"&QueryId=[dr]a060f00000vaTpR,[ver]a060f00000vaZlH,[det]a060f00000vaZlg?pv0="+skuid.$M('Timeline').data[0].Id;

window.open( CongaURL, "Conga", "height=600, width=600, menubar=0" );