The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Callable Client Script from subflow

Annette Kitzmil
Tera Guru

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.

 

AnnetteKitzmil_0-1704812900933.png

 

Thank you

7 REPLIES 7

Is that field on the form? 

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.

Sandeep Rajput
Tera Patron
Tera Patron

@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.