Using the below code to trigger a process upon clicking on an iconindicator image. Used SubmitLink to show confirm message and upon confirming, the process model is triggered, but still throws the error in the image below. Please advise if anything wrongly save into target variable inside the SubmitLink which is where the error is pointing to.
Code:
a!imageField( label: "Take Action", showWhen: ri!enableTriggerImages, images: { a!documentImage( document: a!iconIndicator( "MOVE_RIGHT" ), showWhen: isnull(rule!NSA_GetStatusOfApprovalTeam_ExprRule(ri!NSARequest, fv!item)), altText: "Submit", caption: "Submit " & fv!item, link: a!submitLink( label: "Submit for Review", confirmHeader: "Please confirm!", confirmMessage: "Please confirm to submit.", confirmButtonLabel: "Confirm", confirmButtonStyle: "PRIMARY", /*value: ri!NSARequest,*/ saveInto: { a!startProcess( processModel: rule!NSA_GetPMConsByTeam_ExprRule(fv!item), processParameters: { NSARequest: ri!NSARequest, cancel: false, newComments: null, taskRequest: true, teamToAssignTask: rule!NSA_GetGroupByTeamName_ExprRule(fv!item), updateRequest: false }, onSuccess: a!save( ri!NSARequest, null ), onError: a!save( ri!NSARequest, null ) ) } ) ), a!documentImage( document: a!iconIndicator( "MOVE_RIGHT_DISABLED" ), showWhen: not(isnull(rule!NSA_GetStatusOfApprovalTeam_ExprRule(ri!NSARequest, fv!item))), altText: "Action Completed.", caption: "Action Completed." ) }, size: "ICON" )
Error:
Discussion posts and replies are publicly visible
But, as per document, The Start Process smart service is available as an expression function that can be executed inside a saveInto on a Interface Component or as part of a Web API.
How to get rid of this error? any advice please?
Hi anushas0002 , I Suspet the issue is with onSuccess and onError parameters, try to remove both of those parameters in a!startprocess and give it a try.
And can you make sure the following rule "rule!NSA_GetPMConsByTeam_ExprRule" is returning constant of type process
Hi Anushas0002,
As per the error please check the NSA_GetStatusOfApprovalTeam_ExprRule and if there are any With variables used inside the SaveInto ,
Please avoid that and try to test the rule or print the result of the rule.
AFAIK, The error is because of local variables defined in the With.
Thanks
Siva Chimata