Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)
Posted on by 135

.

*This post is locked for comments

  • RainChong Profile Picture
    RainChong 135 on at
    RE: How to Sum field value in a table

    @Andre ty so much for ur guidance! its working thx

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: How to Sum field value in a table

    Hi Rain,

    Note that my name is not Andrea. It is André, but that's forgiven.

    When using display methods, you don't have the need for a new field. Then you can do the calculation in the display method on existing fields. It is just like the other examples on the on-hand form.

  • RainChong Profile Picture
    RainChong 135 on at
    RE: How to Sum field value in a table

    @Andrea Even I go to Form and add some method still couldn't work. This is pretty hard to get data by using the new field

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: How to Sum field value in a table

    Hi Rain,

    If the manager needs another view, then probably a display method as discussed before would be the best option. The on-hand form already contains a lot of display fields. You can review them to see what you need to do to achieve a new display method based on your calculation.

  • RainChong Profile Picture
    RainChong 135 on at
    RE: How to Sum field value in a table

    @Sukrut Im not doing any practice this is my manager wanna to see

  • RainChong Profile Picture
    RainChong 135 on at
    RE: How to Sum field value in a table

    @Andrea My manager just wanna see a simple calculation in order to easy for them. That's all

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: How to Sum field value in a table

    Hi AX2012,

    As mentioned above by others and me, changing records in the InventSum table is a tricky one. Can you explain the need for the field AvailStore? If you can explain the business requirement, we can try to help you.

  • Suggested answer
    Sukrut Parab Profile Picture
    Sukrut Parab 71,647 Moderator on at
    RE: How to Sum field value in a table

    If you are trying this just for practice don't do it with inventsum table . Try to play with some other table. The way data gets inserted in inventsum  is very different.

  • Suggested answer
    BrandonSA Profile Picture
    BrandonSA 1,669 on at
    RE: How to Sum field value in a table

    Ok, now I see what you're trying to do.

    My code will work perfectly. The error you're getting now is for a different reason.

    The error you're getting there is a duplicate record error, which means you're trying to create a record that already exists.

    You can't and mustn't create InventSum records like that.

    Not sure what you're trying to do with this mod, but you probably want to add code like this.Field3 = this.field2 - this.field1; on the insert() method of the inventSum table, before the super().

    Someone who knows the whole inventory framework and inventSum table will be able to make a better suggestion.

  • RainChong Profile Picture
    RainChong 135 on at
    RE: How to Sum field value in a table

    7065.123.PNG


    When i use your method it didnt work

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans