flow to be triggered from post clone script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2024 08:59 PM
Hello everyone ,
Plz advise on how to create flow to be triggered from post clone script to do the following:
Assign admin role to ABC group
Assign admin role to the remaining users who will need it (User A,User B,UserC)
Set theme for the instance
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2024 09:21 PM
You need to write a post-clone script that will execute after the cloning process. This script will call your flow.
(function() {
// Trigger the flow after the clone
var flow = new FlowAPI();
var flowId = '<Flow ID>'; // Replace with the actual flow sys_id
flow.startFlow(flowId);
})();
And to set theme you will have to create user preference.
Hope this will help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2024 09:47 PM
Hi @CV1
You can trigger your flow through FlowAPI. For your flow, you can get the trigger script created by navigating to your flow and clicking on Create Code Snippet.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 06:48 AM
Thank you for the reply, I was looking for help on how the flow/subflow need to trigger to achieve the above conditions, if a subflow , the what will be the inputs
how to preserve the theme.
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 05:53 PM
@CV1 the glide.ui.polaris.theme system property stores the sys_id of the currently active theme. You can leverage this property to preserve and reapply the theme during a clone.