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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Orig method not working

(0) ShareShare
ReportReport
Posted on by

I have used two temporary tables in my form. One is for all the controls and the other is for a grid. I am trying to obtain the values before update for on of the grid fields using orig but it does not seem to be working. The same if applied on the other temp table is working fine, therefore, I am a little confused as to what to do? Could you give me a few suggestions? 

//modified method on the formdatasource field 
public void modified()
{
    real oldVal = TempTable2.orig() 
    ///using the name of the table as is because
    it has the same meaning as using cursor.///
    real newVal = TempTable2.Value; //New value, after update
}

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Hi Shravyad,

    Could you provide the complete code?

    The orig method is generally used to compare buffers(before update),where do you use it?

  • Community Member Profile Picture
    on at

    I am trying to compare buffers as well. To find the difference in value for one field. I am using it in the form in the modified method of the datafield

  • WillWU Profile Picture
    22,361 on at

    Hi ShravyaD,

    Did you put the method before super()?

  • Community Member Profile Picture
    on at

    Hey Will,

    Yes, I did

    Shravya

  • WillWU Profile Picture
    22,361 on at

    Hi ShravyaD,

    Try to add your field after the method:

    TempTable2.orig().yourfield;

  • Community Member Profile Picture
    on at

    I tried that too but it is still not working

  • WillWU Profile Picture
    22,361 on at

    Hi ShravyaD,

    What do you mean by "not working"?

    Can you get any value or not?

  • Community Member Profile Picture
    on at

    I do not get any value. It always returns null.

    Regards,

    Shravya

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi ShravyaD,

    Do you modify field for new record or existing one?

  • Abigail Profile Picture
    552 on at

    You would just put a pre-event handler on the table update method, then use Orig method.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans