Hi all,
I'm new on C4C developments and I have some questions.
I already read some cloud development courses provided by SAP and went through different post that can be found on this blog.
I was hoping someone could help me ^^.
Could someone please explain to me the following topics:
AfterModify
- Is there any way to know which attributes were changed or modified when the event AfterModify is triggered?
In my case, I would like to manipulate certain attributes of a BO when certain information is entered in other attributes. - I found on another post on this website the following statements:
Is this true?
I tested the first statement on an extension of astandard BO (Employee)and the AfterModify event is not being triggered when the BO is being loaded of when you go into edit mode.
Reading BO data: Current displayed data VS data stored on database
Due the fact that I didn’t found how to detect which attributes were changed when the event “AfterModify” is being triggered, I tried to make a comparison between the currently display data and the data that should be store on the database (I decide to try this approach as a ABAP developer: OW vs DB data).
Coding below was placed on the event "AfterModify" and also on event "BeforeSave". In both places I received the same result.
"This"Statement
To access the current displayed data on the screen, I use the “This” statement and I read the current assigned phone number of the employee (See coding below).
Now, i tried to access the real value of the phone employee( which should be stored on database level) using two different approaches:
Approach 1: Context.GetCurrentIdentityUUID + qryIdentity_ROOT_QueryByElements + Employee.QueryByIdentification
Approach 2: Employee.Identification.Retrieve
Now I would expect that the value of the variable phone_ow should differ from the value of variables phone_db and phone_ins. However all 3 variables shows/contains the same value event when the attribute was changed by the user (Changed + press save button). I should expect that the last 2 approached should read the value of the attribute phone before any changes was performed.
Could any explain this to me?
Could any one explain to me how (on runtime on a script file) to read values from database?
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks in avance for all your answers and explantions.
Kind regards,
Andres
ps: In case my coding, suppositions and statements are false/wrong, please dont hesitate and let me know ^^