Launch Conga Conductor from a Skuid Page

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Photo of Daniel Camp

Daniel Camp

  • 372 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Official Response
Okay, after much ado, here is the solution:

Short version: You have to create a Salesforce Custom Button / Link on your Commission object, and then choose this Custom Button / Link as the action that your Skuid Page Title Button will run.

Long version: 

(NOTE: Daniel, I have already done this for your Sandbox org)

1. Go to your Commission object in Salesforce Setup, and go to Buttons / Links / Actions.
2. Create a new Button / Link, called something like "Generate Invoices"
3. For Display Type, choose "Detail Page Button".
4. For Content Type, choose "URL".
5. For the URL, paste in the exact URL you get when you click "Launch" on your Conga Conductor button, only replace the Session Id with {!$Api.Session_Id} and the Server URL with {!$Api.Partner_Server_Url_160}, e.g.

https://conductor.appextremes.com/apps/Conga/Conductor/LaunchCC.aspx?sessionId={{$Api.Session_ID}}&serverUrl={{$Api.Partner_Server_URL}}&ReportId=00OK0000000TezS&UrlFieldName=Conductor_Commissions_Invoice__c

6. Save your button.
7. Back in your Skuid Page, change the Action Type of your Page Title Button to be "Custom: SF Button / Link".
8. Select "Generate Invoices" from the list of buttons that is returned.
9. Save your page and preview.

Explanation

Why won't the "Redirect to URL" action type work? The root cause of the issue is Session Id privileges. Salesforce issues different at least 6 different types of Session Ids depending on what context you're in, all of which have different privileges (see this StackExchange post for more details). This is relevant here because your Conga Conductor is getting its merge data from a Report, rather than via a SOQL query. For Conga to run Reports, it has to have a top-tier Session Id --- but Skuid runs in a Visualforce context, so the Session Id that Skuid Pages get is not privileged enough to run Reports. Fortunately, the workaround above circumvents the problem --- by having your Skuid button run a Salesforce Custom Button / Link, you are in effect running in a more privileged session id / execution context.