on 09-09-2015 10:45 AM
Hi all.
I need to enhance a standard BO and need to add a field-A. The newly added field has to dynamically enabled/disabled.
My Approach is to add a new field called "EnableIndicator" to the BO and populate this field based on some logic in AfterLoading event. In the
Extensibility Explorer i will adjust the properties of field-A to bound to the EnableIndicator.
But the AfterLoading() event is not available when i extended the standard BO. Is there any way to meet this requirement.
Thanks,
Naga
Hi Naga,
since in AfterLoading you can only populate transient fields and since transient fields are not allowed on extension BO nodes (except new nodes) your scenario would not work as you assume.
However, since AfterLoading is "evil" performance-wise anyhow, I would suggest filling the custom field in the AfterModify or BeforeSave event and persist it's content.
Best regards,
Ludger
--
Custom development with All4Cloud.de
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ludger,
I have a problem here.
1. I created a opportunity with a Account as "Prospect" and saved the opportunity. I also saved by custom indicator flag.
2. Some one changed the Account as "Customer".
3. Reopened the Opportunity, now the custom indicator is still the same , as AfterSave/AfterModify not got triggered to change the indicator.
Any idea how to handle this scenario.
Do i need to update the custom indicator on AfterSave of Account OR
Can i do it in Opportunity at run time.
Thanks,
Naga
Hi Naga,
I am not familiar with the data structures and their dependencies of C4C since I am doing mostly ByDesign.
Furthermore I am not familiar with your requirement and the dependencies resulting from them.
So I can only give general advice:
Keep in mind the dependencies of your flag and pay attention which data modification requires recomputation of your flag.
The flag needs to be recomputed every time when a field it depends on is modified.
This means every node where a modification may happen requires an AfterModify or BeforeSave-Event where recomputation is triggered from since only the AfterModify/BeforeSave of the node where the field resides on is triggered reliably.
You do not need to duplicate your code everywhere.
Using a Reuse-Library or modifying a field of the BO node where the computation happens will suffice (usually - there are some dependencies when which event is called and when not).
Best regards,
Ludger
--
Custom Development with All4Cloud.de
Hello Naga,
Is it possible to enhance the SAP BO with a new node?
In this case you will have the AfterLoading for a transient element.
You may also add another field which indicates if the evaliation was already executed...
Bye,
Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Horst,
No, still the break-point is not getting triggered. Let me explain my requirement
I have added a extension field in CAS on Opportunity TI. This field has to be enabled/disabled based on the Opportunity's Account's prospect indicator. Any suggestions on how to achieve this.
Thanks,
Naga
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.