In this blog Insight into calculated fields created by AET
I introduce one approach to define your extension field with your specific logic via calculated field supported in CRM Application Extension Tool ( AET ).
If your logic is too complex to be covered by the embedded formula in calculated field editor in AET, for example there are some ABAP coding involvled, you can try another apporoach:
(1) Create a new entry in table AXT_BEHAVIOR
(2) Your custom behavior could be implemented in class ZCL_AXT_CUSTOM_BEHAVIOR, which inherites from class CL_AXT_ABST_BEHAVIOR_HDLR.
Depending on your logic, different methods must be redefined.
For my requirement, I just would like to add a timestamp each time the extension field is maintained, so I have to only redefine the following methods.
a. define the appearance of extension field:
(3) When you create extension field, choose “Not defined” as Field type, and choose the entry maintained in step1 as “Render/Validate As”:
Click Enable Expert Mode and assign one data element to this extension field:
Generate the extension field and make it visible in WebUI. After I maintain some value for this field and click save:
the ADJUST_SET method of handler class is called and the timestamp is appended: