Skip to Content

Get modified fields

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 15, 2016 at 01:12 PM

    Hello Peter,

    The data type ENCRYPTED_EXTENDED_Name takes up to 765 characters.

    HTH,
    Horst

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 15, 2016 at 02:16 PM

    Hello Peter,

    The only way is to call a query via "ExecuteFromDBDataOnly".

    Bye,
    Horst

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Peter,

      Sorry, but the Dependent Objects do not support direct quiereis on them. Therefore the framework is not able to retrieve any data except via the instances of the hosting nodes.
      And these are only existing in the buffer (the current data).

      So, "No" is the answer.

      Sorry,
      Horst

  • Nov 15, 2016 at 03:26 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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