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)

Multiplication and assigning the Product value to a table column

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have a requirement where I ll be multiplying a table column value with an RealEdit (Value) and assigning the product to an another field of the same table.

Example.

I have a table named tmp_InventTableModule and it has three columns (Price,PriceUnit,tmpPrice) respctively.

I want to assign a Product value to the field (tmpPrice) as below :

tmpModule.tmpPrice = InventTableModule.Price * RealEdit(Value)

PLEASE FIND MY CODE BELOW. ALL THE FIELDS IN THE TABLE ARE GETTING INSERTED PROPERLY EXCEPT THE FIELD (tmpPrice). Please let me know where and what am I missing or doing wrong : 

while select sLines

where sLines.createdDate >= createDate && sLines.createdDate <= EndDate
{
if(sLines)
{
select Price,PriceUnit from iModule
where iModule.ItemId == sLines.ItemId && iModule.Price != 0;
if(iModule)
{
tModule.Price = iModule.Price;
tModule.PriceUnit = iModule.PriceUnit;
tModule.FilterDates = sLines.createdDate;
tModule.tmpPrice = (iModule.Price) * (Percent_1.realValue());
tModule.insert();
tmp_InventTableModule_ds.refresh();
}
}
else
{
Box::info("No Sales Lines Exists Between the Ranges Selecteed !!");
}

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Just to add my Above Post.   currently the field (tmpPrice) is getting inserted as (0.00)

  • Mea_ Profile Picture
    60,284 on at

    Hi Microsoft Mania,

    Could you please confirm that (Percent_1.realValue()) does not return 0 ?

  • Community Member Profile Picture
    on at

    Hi Ievgen,

    Thanks for replying. Yes it is not returning zero. I tested it

  • dynamics developer Profile Picture
    2 on at

    Try inserting some random value to the field and check if it is populated. If yes then either of iModule.Price OR Percent_1.realValue() is zero.

    If not then you should synchronize your table, restart the client or that doesn't help restart the AOS.

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans