on 11-15-2016 9:35 AM
I would like to execute some code, only when a special field changed its value.
I already successfully could check the LifeCycleStatus of an opportunity (DB query in before save).
But when I try to check the note of an opportunity (TextCollection.TextByTextTypeCodeAndLanguageCode.TextContent.GetFirst().Text.content) in db, there is already the new value before save.
I am also not able to create an AfterLoading method in my opportunity extention, or a new custom text element where I could store more than 255 characters.
Is there any possibility to check which fields changed value?
Hi Peter,
You create a new element in the Opportunity (oldText for example). Then on the before save you can copy the realText attribute to this.
That way you always have the old value on the aftermodify (stored from the previous save).
This is the only way I know of.
Regards,
Richie.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Richie,
but my problem with this solution is, when I save an opportunity the first time, the new custom field is empty and I get a message that the value of my field changed.
I could check an indicator for the first safe, but how do I know whether there is a change or not?
Is there a way to fill the new element initially? (not manually)
Best regards,
Peter
Hello Peter,
The only way is to call a query via "ExecuteFromDBDataOnly".
Bye,
Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Peter,
The data type ENCRYPTED_EXTENDED_Name takes up to 765 characters.
HTH,
Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Horst,
do you know any event where I could get the old value, before it got changed?
Maybe after loading, or before modify, or is there an option to see which field changed in after modify?
In a new custom business object I am able to create an after modify method but not for the opportunity extention.
Thanks in advance,
Peter
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.