on 2021 May 26 2:06 PM
Dear Experts,
We are trying to implement the following scenario:
If a visit is set to "completed" and no follow up activity has yet been created, we want a popup to appear before saving the visit completion reminding the user to create a follow up activity.
To meet this requirement I have taken following steps:
1. I implemented a logic in the BeforeSafe-event of the Activity.xbo, which sets a custom indicator field "Z_popupIndicator" to "true" if:
- No follow-up activity was created in the visit (FollowupBTDRef.Count() <1) AND
- The visit has been set to "completed" (LifeCycleStatusCode = "3")
2. I created an Embedded Component "Z_PopupOnVisitCompletionWithoutFollowUp_EC.EC.uicomponent"
- I have bound the DataModel of this EC to the Activity - Object and extended it with the following elements:
- Afterwards I created and configured an InPort for the field VisitID
- Furthermore I added and configured the handler for the InPort
- Next I added another eventhandler which checks if the field "Z_popupIndicator" has been changed
- … and configured it to show the ModalDialog in case it has been set to “true”
3.finally I attached the above described EC to the COD_Visit_TI.TI.xuicomponent and bound it
For testing I select a visit with no follow up activity and set it to "completed".
In debugging I can see that my indicator field "Z_popupIndicator" is successfully set to "true".
However no popup appears.
Does anybody know why this is not working? What am I missing or doing wrong?
Thanks and kind regards,
Anna
Request clarification before answering.
Hi Anna,
You can refer to the below blog for dispalying popup
https://blogs.sap.com/2019/08/27/display-popup-in-sap-c4c/?preview_id=859204
Also, if you need to raise a simple message then you use standard method raise message to display an error message.
Thanks,
Gayatri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gayatri,
The user specifically wants a popup, not an error message.
Unfortunately, I have not been able to successfully implement the steps from this block in the visit resp. activity object.
Do you know of any difference between the business objects that might need to be considered here?
Thanks and kind regards,
Anna
Hi a.schlittenhardt
Please refer below blogpost for the detailed steps to create a popup in C4C. Could you please check with these steps, I'm sure it will solve the issue.
https://blogs.sap.com/2019/08/27/display-popup-in-sap-c4c/
Hope this helps,
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
Thank you very much for your reply.
I have tried to apply the steps described in the block - unfortunately this was not always possible based on my requirements.
For example, in the Visit_TI there is no "GenericOutport" - I chose "PublicOutPortECVisitRoot" instead - but this did not lead to the desired result.
In the Lead object I managed to create a popup with the help of another block (https://blogs.sap.com/2018/06/20/create-pop-up-screen-sap-c4c/ ) - but I could not transfer this to the Visit object either.
Do I have to do something different when creating a popup in the visit resp. activity object?
Thanks and kind regards,
Anna
User | Count |
---|---|
16 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.