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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Send Approval Request action check in al

(1) ShareShare
ReportReport
Posted on by 173
Hi ALL, 
This is in  Send Approval Request.
I want if workflow is enabled, a certain check to be done and if a check completes without error, then run ApprovalsMgt.OnSendPmtForApproval(Rec); but if there is an error message displayed, no running of ApprovalsMgt.OnSendPmtForApproval(Rec); below is my code
    
     if ApprovalsManagement.CheckPmtApprovalsWorkflowEnabled(Rec) then begin
                                
                                if MgtSetup."Archive Trans" then 
                                
                                    archiving.TransArchieved(Rec);//error shows here if the condition is not fulfilled
                                
                                 ApprovalsMgt.OnSendPmtForApproval(Rec);
                            end;       

      
Kindly assist
I have the same question (0)
  • Verified answer
    YUN ZHU Profile Picture
    100,552 Super User 2026 Season 1 on at
    If you try not to modify the standard code, how about handling your check in the trigger OnBeforeAction()?
     
    Hope this helps.
    Thanks.
    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,184 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 677

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans