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 :
Customer experience | Sales, Customer Insights,...
Suggested answer

How to update the field using jscript in d365

(0) ShareShare
ReportReport
Posted on by 142

Hlo, Can anyone tell me how to update the fields of tables 

I have a table purch table,purchline,due for confirm,purch orderjournal 

fetch record use for purch line

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: How to update the field using jscript in d365

    Hi Sumedha,

    Can you provide more details? I'm not sure which fields you want to update and which table(s) these fields are in.

  • Community Member Profile Picture
    on at
    RE: How to update the field using jscript in d365

    Hello   

    i have similar req, and below is the field and code i used in the button using ribbon benchwork , but it is not working

    function (executioncontext) {

    var formContext = executioncontext.getFormContext();

    if (formContext !== null) {

    formContext.getControl('azmdc_AZstatus').setValue === 100000003;              

    //   AZstatus is a choice column  and itx value 100000003 = completed also tried .setValue(100000003);  didn't work

    }

    }

  • Suggested answer
    Pradeep Rai Profile Picture
    5,489 Moderator on at
    RE: How to update the field using jscript in d365

    Hi

    Please refer below links:

    https://carldesouza.com/get-and-set-field-values-using-formcontext-and-javascript-with-dynamics-365/

    Thanks,
    Pradeep

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: How to update the field using jscript in d365

    Hi psk_12,

    Please try this code:

    formContext.getAttribute('azmdc_AZstatus').setValue(100000003);

    Please make sure "azmdc_AZstatus" is your field name. 

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 > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 127

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 127

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 125 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans