web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Create a Approval Request from Code

(1) ShareShare
ReportReport
Posted on by 2
I am working with Business Central Online, in AL.
 
We have an integration that creates sales orders in BC.
 
When the order is created, the code is to make an approval request. I trigger this through an API request after the order and all items have been added.
 
 [ServiceEnabled]
    [Scope('Cloud')]
    procedure CreateApprovalRequest()
    var
        ApprovalsMgmt: Codeunit "Approvals Mgmt.";
    begin
        if ApprovalsMgmt.CheckSalesApprovalPossible(Rec) then
            ApprovalsMgmt.OnSendSalesDocForApproval(Rec);
    end;
The issue is we are using an integration account, not a real user, and the integration account is not in the approval user setup, so it is failing.
 
Is there a way around this? Another approach I can take to try and automate the creation of the approval request?
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 394

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 123

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 106 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans