0

Hi I have a list type of List which is returned from the invocable action.

List<Invocable.Action.Result> results = action.invoke();

I am getting the data as below in the form of result.

(Result":[
   "action=Action":[
      "invocations=("{
         "QuestionDevName=testA",
         "ResponeValue=WBFH"
      }")",
      "invokeFromLightningComponent=false",
      "name=Tser",
      "namespace=null",
      "type=runDecisionMatrix"
   ],
   "errors=()",
   "invocationParameters=(already output)",
   "outputParameters="{
      IndividualScore=20.0
   },
   "success=true"
])

Kindly help me to take out the IndividualScore and store in another list in below List testInteger = new List();

Trying below approach as

testInteger = results.get(Result.outputParameters.IndividualScore);
2

1 Answer 1

0

You use the getOutputParameters() on the results.

Integer[] testInteger = new Integer[0];
for(Invocable.Action.Result result: results) {
  testInteger.add((Integer)result.getOutputParameters().get('IndividualScore'));
}
1
  • Thankyou very much @sfdcfox :), i was trying to crack this from 4hrs ,.
    – Shekher
    Jul 2, 2023 at 4:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .