I have requirement to create extension field for running no. of sales order, purchase order and opportunity.
I have added extension field in standard business object, add logic at event On-BeforeSave.
My logic is just check if it is not set. Then calculate running no. with some condition and set it. (It will be called everytimes when business object are saved)
The problem is when I create by copy from existing document (sales order, opportunity and purchase order). SAP ByD replicate the value of extension field automatically to the new document. That make my code can not execute as it just check the value is set or not set and that extension field always have value from existing copied document.
How could I solve this problem ?