Launching Conga from Skuid Table Row Action

edited January 12, 2018 in Questions
We are working on a conga button for a client who uses Skuid, for all their Salesforce UI but also leverages Conga for template building. We are trying to create a button on a table to be able to generate conga templates for each record in the table using a Row Action.

We found this article which says you can do this and we tried to do the same thing (Conga has changed their server url to "https://composer.congamerge.com" since the article was posted.


But we get this error: "OAuth Error:
Failed to get the authorization response."


This is the way the button is written based on the syntax that Skuid requires:
 https://composer.congamerge.com?sessionId={{$API.Session_ID}}&serverUrl={{$API.Partner_Server_URL}}&id={{Id}}&ReportID=00Oj0000004CC5z?pv0={{Id}}



This is the button if it were in standard salesforce (which does work).
https://composer.congamerge.com
?sessionId={!API.Session_ID}
&serverUrl={!API.Partner_Server_URL_290}
&id={!Matter_Contact__c.Id}
&reportid=[Letterhead]00Oj0000004CC5z?pv0={!Matter_Contact__c.Id}



I was hoping you might have some idea why we are receiving that error because we seem to be meeting all of the requirements based on the article above.

Comments

  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    I don't know everything, but I do see an error in your merge sytnax.  It should be Api not API  (case, case, case)

    Also need to make sure the value for {{Id}} is what you expect.  Make sure the component where the button is located is bound to a contact model - or use global merge syntax to send the contactId to the button

    See this document for more information about the merge syntax: 

    http://help.skuidify.com/m/11720/l/187263-global-merge-variables-functions
  • edited December 2, 2016
    Grace,

    I haven't had to do this for conga composer but for conga conductor. So I am not sure if this will apply. But I ran into a problem with the session id and server URL so set them as I did below.

    "?sessionId="+sforce.connection.sessionId+
    "&serverUrl="+ partnerServer +

    Here is the full snippet. Maybe you can just make tweaks to it.
    var idArray = skuid.$.map(arguments[0].list.getSelectedItems(),function(item){ 
    return item.row.Id;   });   var urlFieldName="AC_Print_Sales_Invoice_Batch__c";   var partnerServer = sforce.connection.partnerServerUrls[8];  var CongaURL = "https://conductor.congamerge.com" +   "?sessionId="+sforce.connection.sessionId+  "&serverUrl="+ partnerServer +   "&MOID=" + idArray +   "&UrlFieldName="+urlFieldName;     window.open( CongaURL, "Conga", "width=700,height=450,menubar=0" );
  • Jack SanfordJack Sanford San Antonio, TX 💎💎
    edited January 12, 2018
    We are getting an error "Failed to get or create an account", but only for some users. In particular, for users that per their job sometimes log in to a separate Salesforce org with a different instance name, when they run our row action to call Conga Composer, conga tries to authenticate using that instance name, e.g. our instance name is na9, but Conga tries to authenticate at na4.force.com

    Is there a better way to get at that top level session ID now? I'd really like to not have to use the salesforce button to do this, as this post suggests: https://community.skuidify.com/skuid/topics/launch-conga-conductor-from-a-skuid-page?topic-reply-lis...

    Has Tami figured out how to get that top-level Session ID by calling sforce.connection.sessionId in JavaScript vs. {{$Api.Session_ID}} in merge syntax?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!