Vlocity Facts #43 || How to pass recordId from Utility Items to Omniscript by using LWC
In one of the previous post I have discussed about how to launch omniscript from Utility Items. [How to call Omniscript from Utility Items]
If we need to refer current page recordId in omniscript and perform logic, we can't achieve that by using standard method mentioned in above link. To overcome this we need to launch omniscript from the LWC. Let's see how to launch omniscript from LWC.
1. Create Omniscript according to your requirement. For example I'm fetching account details and displaying.
3. From top right side of the omniscript click on how to launch button and copy the first link. We will use that in LWC.4. Now create LWC to Launch the omniscript and paste the copied URL as shown.
5. Now open js file of the LWC and copy below code.
6. Now open xml file and copy below code.
7. From setup -> App -> open the app according to your requirement and add the LWC in Utility Items.Output:
Comments
Post a Comment