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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Workflows of current page

(0) ShareShare
ReportReport
Posted on by 115

Hi guys,
I have question about workflow. How can get value of field in page. I make workflow when you make change of field "Assigned User ID" in Service Order page (5900) I want to get value of this field and send him a email? 

I have made an event on the table and on the field. When I set to check the box in the table and for response I want to take value of the field and to send email. What to do?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    Could you please share what have you tried till now and what issue are you running into with your current code. For me your query is not clear.

  • YuliyanR Profile Picture
    115 on at

    Hi, Suresh Kulla!

    This is my Event. He connection to Service Header table (5900). When you have changed this field "Assigned User ID". I want to get this value in "Assigned User Id", for response and send notification this User. 

    step1.png 

    I made a response that compares the fields from the event and response, when the fields are equal to number (id) i'm  write result of  value in a new column of the Workflow Step Argument table (1523). But I do not know how to take the value from the Service Header page. I want the response to be dynamic.

     step1.png

  • YuliyanR Profile Picture
    115 on at

    <b>This is my code in codeunit - 1520 - Workflow Event Handing. This event work only on a table 5900 - Sales Header. I'm want when you have change in the page to send notification, where Assigned ID is assigned. </b>

    [EventSubscriber] RunWorkflowOnChangeServiceHeaderChanged(VAR Rec : Record "Service Header";VAR xRec : Record "Service Header";RunTrigger : Boolean)

    IF FORMAT(xRec) <> FORMAT(Rec) THEN

     ///

     recref.GET(RecId);

    field.SETRANGE(FieldName,FieldName);

    field.SETRANGE(TableNo,RecId.TABLENO);

    IF field.FINDFIRST THEN BEGIN

      fieldreff := recref.FIELD(field."No.");

      fieldvalue := fieldreff.VALUE;

    WorkflowStepArgument."Notification of  current value" := fieldvalue;

    //WorkflowStepArgument.MODIFY;

    END;

     ///

     WorkflowManagement.HandleEventWithxRec(RunWorkflowOnChangeServiceHeaderCode,Rec,xRec);

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans