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 AX (Archived)

Handling "Default Order settings" screen's default values...

(0) ShareShare
ReportReport
Posted on by

Hello, what I'm trying to achieve is; when the user clicks an item in release products screen and open default order settings screen from manage stock tab, I want to get purchase,stock and sales sites values from it and check whether they are empty or not.If they are empty, I want to assign them default values.

I have checked init,run etc ..all methods i could think of of the form InventItemOrderSetup to get the event that loads the data to site check boxes,but still no luck.Does anyone have experience with that screen and how it gets the data for those values?

Regards

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Ivan (Vanya) Kashperuk Profile Picture
    on at

    Doing it after super() in run() method on the form should allow you to get the corresponding values, and update them if necessary.

    I would however advise against doing it the way you described above.

    Instead, I would add the code on the initValue() method on the corresponding tables, so that when these records are initially created, they would get some non-blank values by default.

    Note that the default sites are not stored in the InventItem*Setup tables directly, but rather in the linked InventDim records (through field InventDimIdDefault)

  • Community Member Profile Picture
    on at

    I see thanks, I have tried getting the values in run method,and i get the values, no problem,however I can not set the new values,why would that be?

    public void run()

    {

       super();

       if(!InventDimPurch_InventSiteIdGeneral.text())

       {

           InventDimPurch_InventSiteIdGeneral.text("CENT");

       }

       if(!InventDimInvent_InventSiteIdGeneral.text())

       {

           InventDimPurch_InventSiteIdGeneral.text("CENT");

       }

       if(!InventDimSales_InventSiteIdGeneral.text())

       {

           InventDimPurch_InventSiteIdGeneral.text("CENT");

       }

    }

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 AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans