Skip to main content

Notifications

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
}

  • Community Member Profile Picture
    on at
    RE: Orig method not working

    Existing record

  • Abigail Profile Picture
    550 on at
    RE: Orig method not working

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

  • Sergei Minozhenko Profile Picture
    23,091 on at
    RE: Orig method not working

    Hi ShravyaD,

    Do you modify field for new record or existing one?

  • Community Member Profile Picture
    on at
    RE: Orig method not working

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

    Regards,

    Shravya

  • WillWU Profile Picture
    22,352 on at
    RE: Orig method not working

    Hi ShravyaD,

    What do you mean by "not working"?

    Can you get any value or not?

  • Community Member Profile Picture
    on at
    RE: Orig method not working

    I tried that too but it is still not working

  • WillWU Profile Picture
    22,352 on at
    RE: Orig method not working

    Hi ShravyaD,

    Try to add your field after the method:

    TempTable2.orig().yourfield;

  • Community Member Profile Picture
    on at
    RE: Orig method not working

    Hey Will,

    Yes, I did

    Shravya

  • WillWU Profile Picture
    22,352 on at
    RE: Orig method not working

    Hi ShravyaD,

    Did you put the method before super()?

  • Community Member Profile Picture
    on at
    RE: Orig method not working

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,069 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,858 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans