Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Showing the price of an Item based on item select.

(0) ShareShare
ReportReport
Posted on by 485

Hello Everyone, 

I have a requirement to develop a form to show the item price of an item  based on the item that is selected. This is what I have done:

1. create a table with 2 fields ItemCode (extendedDataType---ItemID) and ItemSaleprice(this sales price should come form table InventTableModule  Price column)

I hava a job that gives me the item sales price here is the code:

static void CheckPriceITM(Args _args)
{
InventTableModule inventTableModule;
InventTable inventTable;
EcoResProduct ecoResProduct;

while select inventTable
where inventTable.ItemId == "105102"
join ecoResProduct
where ecoResProduct.RecId == inventTable.Product
join inventTableModule
where inventTableModule.ItemId == inventTable.ItemId
{

if (inventTableModule.ModuleType == ModuleInventPurchSales::Sales)

      {
         info(strFmt(" %1", inventTableModule.Price));

      }
  }
}

My question is,  now do i get the job and put it in a way that on the form, when I select an item it shows the price in another control.

Please help, thanks.

MY FORM

priceform.png

*This post is locked for comments

  • Verified answer
    Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: Showing the price of an Item based on item select.

    Hi Lionel07!

    You can try to use modified() method on form control (or field on data source table).

    You need to set auto declaration property of your ItemPrice control to Yes and then in modified() method of ItemNumber control you can set value to ItemPrice control.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans