Callable Client Script from subflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 07:14 AM
Hello,
I have created a very basic subflow that I can run the server side code snippet using the background script in successfully. Now, I want to create the same thing with a clinet side script in a UI action button. I have added the necessary ACL and made the subflow Callable by Client API. I copied the client side script from the subflow and added line 57 the console.log the name out. I wasn't sure about line 43 - for what the inputs should be, but I tried with current.filenet_document_id and also used the actually document id string. When I click the Open Document UI button, I am getting Failed to execute the UI Action. Please contact your administrator error message.
Ultimately, this will be utilized to open archived documents, but for now, I just want to establish a base. What would be my best option in this case? I appreciate any insight.
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 07:43 AM
Is that field on the form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 09:45 AM
Yes, the field is on the form and I have figured this out, thank you and my apologies for not getting back to you sooner.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 08:01 AM
@Annette Kitzmil Current object is not available inside the client script. If the filenet_docuement_id field is available on the form then you can get the value using g_form.getValue('filenet_document_id'); if the field is not available then simply replace current.filenet_document_id with a string value which the flow expects as valid filenet_document_id.
Hope this helps.