Announcements
No record found.
Hello All, I created new custom workflow I want to have info message when the workflow status changed to approved in d365 application. I added my code to completed method in workflow event handler class. but the info message doesn't show up on the screen when I debug my code the if condition met. but the info message doesn't show up on the screen.
public void completed(WorkflowEventArgs _workflowEventArgs) { TableName trans; select trans where trans.RecId == _workflowEventArgs.parmWorkflowContext().parmRecId(); if(trans.WorkflowState == xxx::Approved) { info("@sys1231"); } }
Hi yousef,
Can you try like below and check.
Message::addMessage(MessageSeverity::info,"labelId");
Thanks,
Girish S.
Thank you for your response I tried it, but it doesn't work.
You have a table method like updateWorkflowStatus which will update the approval status field in table.
In that method check if the statue is approved, if yes add the info message and check.
Hi Girish,
Even I have tried this info method before , This method didnt work for the WorkflowEvent Handler class .But It has worked only for the Submit Manager/Resubmit Action Manager Class.
Even the debugger didnt hit the breakpoint of the EventHandler Class . Since this EventHandler works based on the Batch Job .If you have any idea about this can you please explain ?
I am not sure about this.
But you can try one think. Try setting the notifications on workflow configuration form for completed status.
Hello
isn't worked updateWorkflowStatus for my method that update the workflow status and that's weird why the info message doesn't show up in all cases.
Are you saying that adding code in updateWorkerStatus method doesn't fix the issue?
Yes, doesn't fix the issue.
I am not sure what may be the issue - But I found similar thread which talks about notification is not sending which is setup in workflow configuration form after the workflow is completed. That thread also doesn't have verified answers.
You need to debug the code and find out whether they have cleared messages from info log.
Hi, Don't know your business requirement but Instead of Displaying an infolog, is sending a notification to Approver or Submitter (when workflow is completed) fulfils your requirement?
If yes, then you can try configuring it in Workflow under Basic Settings-->Notifications (For Completed Event)
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 515 Most Valuable Professional
André Arnaud de Cal... 417 Super User 2026 Season 2
CU10121822-0 360