Opening Pop-Up on Click of Button on Standard TI Screen (Sales/Service Cloud)
Recently I came across a client requirement of being able to add a Customer (Individual) to a Target Group from within the TI screen of the Customer.
We have the functionality of adding the customers to the Target Group from the OWL screen but not from the TI screen.
So, here just putting out the steps I followed to achieve that, which could be helpful to some one looking for a similar requirement, basically opening a pop up on the standard screen by click of the button.
P.S. I have not created any custom BO for my scenario, as I was able to achieve my requirement with field extension on the standard xbo. However, similar kind of approach can be tried if custom BO is used.
Step 1: Create an extension field on the customer.xbo
Step 2: Create a Transient field and Action under the BusinessPartnerSolutionExtension.xbo as we cannot do either of the activity under the customer.xbo.
Note: For other standard xbos (eg. Lead/Oppportunity) above activities can be performed in the xbo itself.
Step 3: Create script file of the above created Action, to enable or set the Indicator value on the transient field
Step 4: Create an EC and bind it to the customer.xbo
Do not add any field or UI elements to the EC’s section group. Just drag and drop a ModalDialog.
Create an Inport structure on the Data Model to accept the AccountUUID from the TI screen.
Create an Inport on the controllers tab and do the configurations as highlighted.
Call the Read BO operation on the Inport Handler event
Under the Modal Dialog, add the field which you want to show. In my scenario, just showing the field extended on step 1.
Extended the property of the field as an OVS field bound to the OVS of the Target Group ID
Step 5: Create an Event handler, to show the pop up based on the condition.
The condition is that the value of the Transient field created on the step 2, is set to true.
step 6: Under the Data Model, create a Data field and bind it to the Transient field.
Under the properties, call the event Event Handler created on Step 5, on change of the value of the Field.
Step 7: Extended the standard TI screen of the Customer and add the custom Action on the Button group area.
While adding the custom Action, choose the action from the BusinessPartnerSolutionExtension node of the Customer.xbo as highlighted.
Step 8: Add the EC created to the TI screen
Save and Activate the changes.
Step 9: Test the development
Login to your tenant and navigate to the TI screen of the Individual Customer. Click on the Button highlighted.
Pop Up appears on the standard TI screen via custom action click.