How to get old value in Template

Hi Experts 

I have a template in ADSAccount, where I need to take decision  based on one of the attribute $ExtensionAttribute1$. The value of this property comes from person.

If property represent the type, If type changes I need to put some logic. 

If ($ExtensionAttribute1[o]$ = "Main" Andalso $ExtensionAttribute1:Text$ = "Test")

AppData.Instance.RaiseMessage(MsgSeverity.Serious, "Inside template")
System.Diagnostics.Debug.WriteLine("Different log")

Execute some logic. 

Problem I am facing is, I could not test this scenario. I am trying to change value in object browser then run the execute template nothing happens. 

Is there any way I can put some log there? Thanks 

  • First of all, the template should execute when you change some of the values it depends on, so there should be no need to trigger execute templates after you have saved the object. Secondly, access to the old-value is only possible during the current change of the objects. When you save the object, the old-values will be thrown away.

    What value did you change in the ObjectBrowser and what is the complete code of the template? Did you mark the template as overwriting?