Integrate Approval Process functionality into Skuid

(via zachelrath on “HIGH PRIORITY. If a record is Locked by an Approval Process, we should show this in Skuid. We can check this by querying the ProcessInstance table where TargetObjectId = objectBeingEditedInSkuid. If an Approval Process is defined for a given Object, a “Submit for Approval” button should be able to be added to that Object. This should kick off an Approval process in Apex. We can dynamically instantiate Approval processes in Apex, I believe, because ApprovalProcesses are interfaces in Apex.”

For now, here’s what to do to include Submit for approval buttons & approval history in your Skuid pages.


I want to recreate the Recall Approval Request button in Skuid. I know how the link should be set up, but I can’t get the Id of the ApprovalProcessItem to render in the URL because the button is on a page title block that has Opportunity selected as the model. Transversely, I tried a page title with ApprovalProcessItem as the model and I can’t pull the Opportunity Id (aka TargetObjectId).

We don’t want to expose standard salesforce anything, so are building our own custom object for Approval. Is there any way to ‘lock’ a record outside of the standard Approval Process?

oops - here’s the answer:…

Wanted to post a quick update to your question on locking records. It looks like, as of Salesforce’s Winter '16 release, you can lock or unlock a record via Apex. This would require calling Apex from Skuid by an Apex invocable method (using the Skuid “Run custom Apex action” action) or JS remote action.…

Hope that helps!

I’d like to see some drag and drop support for approvals, please. This is a barrier for entry right now!

In the Millau release, we added Data Source Actions to the Salesforce Data Source Type that allow you to perform all of the following actions:

  • Submit for Approval: Submits a Salesforce record for approval.

  • Approve: Approves a submitted record.

  • Reject: Rejects a record that has been submitted for approval.

  • Recall: Recalls a record that has been submitted for approval.

  • Unlock: Unlocks a record for editing after the record has been submitted for approval.

For more information, see the docs.