- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 09:42 AM - edited 01-09-2023 10:09 AM
Flow action is executing successfully and runtime values are also coming correctly but getting the error at last.
Error Message:
I am calling the flow action from script using //var result = sn_fd.FlowAPI.executeAction('global.attach',inputs);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 10:38 AM
Hey Jonnie,
This error generally comes when a 'RUN AS' user mentioned doesn't have expected roles and privileges.
As you mentioned, When you test it manually, it works fine. The reason might be that you are logged in as Administrator and you have admin role.
But when the 'Action' gets executed from script, the action might get executed by 'Run as' some user and that user doesn't have privileges.
To check this -> Go to 'Executions' tab -> filter the logs for your action -> check 'created by' fields value.
The manually tested action log will be shown as 'admin'.
To resolve the issue, you need to assign roles to user and to just verify it pls try assigning admin role and test. It would work.
Hope this helps!
Regards,
Kartik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 09:44 AM
Hi @Jonnie_,
Change Run as user to System user and try it.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 09:54 AM - edited 01-09-2023 10:18 AM
Hey sagar,
Its a flow action and I am calling it directly from the transform script using below statement.
var result = sn_fd.FlowAPI.getRunner().action('global.attach').inForeground().withInputs(inputs).run();
I am not able to see any 'run as' option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 10:38 AM
Hey Jonnie,
This error generally comes when a 'RUN AS' user mentioned doesn't have expected roles and privileges.
As you mentioned, When you test it manually, it works fine. The reason might be that you are logged in as Administrator and you have admin role.
But when the 'Action' gets executed from script, the action might get executed by 'Run as' some user and that user doesn't have privileges.
To check this -> Go to 'Executions' tab -> filter the logs for your action -> check 'created by' fields value.
The manually tested action log will be shown as 'admin'.
To resolve the issue, you need to assign roles to user and to just verify it pls try assigning admin role and test. It would work.
Hope this helps!
Regards,
Kartik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2023 08:04 PM
Hi
I tried this and it is correct.
But Could you let me know which role a user should have? After assigning admin role it works fine but I don't want to have admin role for that user. @Sagar Pagar @Kartik Choudha1