Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

update value on form grid cell

Posted on by 491

Hi,

i want to update the grid cell value based on two cell values by multiplying it.  when i debug, in modified method i am getting expected value in "num" variable but but it is not reflecting on forms grid.

write.png

here's the code

public void modified()
{
   real num;
    
    num = WriteOffTrans1_Weight.realValue() * WriteOffTrans1_PPPounds.realValue();

    WriteOffTrans1_WriteOffAmount.realValue(num);
    super();
    

}

  • xain Profile Picture
    xain 491 on at
    RE: update value on form grid cell

    Hi martin,

    Thank you, this works like charm!

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 229,420 Most Valuable Professional on at
    RE: update value on form grid cell

    Your approach is indeed wrong. The grid takes values for each row from a data source, either from a field or from a display/edit method.

    If the value is always calculated in this way, then it's likely not necessary to maintain a field in database. You can put a display method on the table, like this:

    display YourEdt writeOffAmount()
    {
    	return this.Weight * this.PPPounds;
    }

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,946 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,420 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans