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, ...
Answered

get orig-data of extended table

(1) ShareShare
ReportReport
Posted on by 616
Hi everyone,
the table EcoResIntValue (for example, also several other tables) is an extension of EcoResValue. How do I get the original table-data before update EcoRes(Int)Value?
EcoResValue included a static methode to get the concrete value record... But that method returns the already changed values of the record... I could not find a way to get the EcoResIntValue.orig() record...
 
I need to know if there are changes on the current record.
 
Regard
Christian
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at
    EcoResIntValue inherits all fields of EcoResValue and you can see them on EcoResIntValue buffer. For example, the Origin field is defined in EcoResValue, not EcoResIntValue, but EcoResIntValue buffers have this field, because EcoResIntValue inherited it. For example:
    EcoResIntValue intValue;
    select firstOnly intValue;
    info(int642str(intValue.Origin));
    When you call orig(), you should get original values of all fields, regardless of whether they're defined in EcoResValue or EcoResIntValue (it's a single a row in the database anyway). Or none, if the orig() method is called at a wrong place.
     
    You said you "I could not find a way to get the EcoResIntValue.orig() record", but unfortunately, you gave us no details. I can't help you with that unless you tell me more about the situation.
  • Christian Busche Profile Picture
    616 on at
    Hello Martin,
    I don't know how to describe it more precisely... I would like to know (need to know) whether the value of a field in the EcoResValues table has changed... I thought that I could check this in the update method, as with other tables, by checking the original data record against the currently changed data record before the next() call. But I can't find the EcoRes(Int)Values.Orig() data set.
     
     
    For example:
    I change the float value from 35 into 30.


     
    Before next update() call, I hope to get the original value with this.orig() (as EcoResIntVlaue)...
     
     
    Hope, this helps to understand my question...
  • Suggested answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at
    Do you mean that you don't know how to see the values of parent table fields? If so, expand the Base_Fields node.
  • Christian Busche Profile Picture
    616 on at
    No... ;-)
    What I need are the original values of the inheriting table (EcoResIntValue, EcoResFloatValue, etc) before the update. The parent table (EcoResValue) does not contain any attribute values, only the table relationships of the inheriting tables (EcoResIntValue, EcoResFloatValue, etc). The attribute values are stored in the inherited tables (EcoResIntValue, EcoResFloatValue, etc).
  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at
    You seem to be extending a wrong table. You want fields of EcoResIntValue, so you should extend EcoResIntValue, not EcoResValue.
     
    If this variable contains an instance of EcoResIntValue, you could technically cast it to EcoResIntValue, but it would be a wrong design. The parent table should contain common logic, not logic for a specific child.
  • Verified answer
    Christian Busche Profile Picture
    616 on at
    Hi,
    I found the error... Was my fault... I need to take the right inherited table... I take the EcoResIntValue but I have to take EcoResFloatValue...
     
    So you can close this question...

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 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans