Hi community!
I would like to share with you the following issue. My team and me are developing a web app where we are adding a JavaScript code in the OnReady event action. From this code, we are trying call an another action which receives a list as input parameter. The problem or error appears when the Google Chrome (in our case, it happens the same with others) execute the JavaScript call.
Our code is:
And the console shows the following error:
When I click on the error link in the console, the explorer shows this code (autogenerated by ODC... ):
In the above picture we can see the error (line 233).
As interesting thing, when we change the method called, without incoming parameter, the call is done successfuly... I don`t know if this information is relevant or not...
Thanks in advance!
Hi there!One solution could be to send the parameter as string on the js module, at the client action the input parameter is a string, the client action should serialise the string as the structure you defined and then with an asign, equal deserialisation object with the local variable you defined.
Hi!! I have a similar issue, this solution could help us too!
Hi Manuel,
Did you add same Javascript library in Resource folder in service studio.
So for running any external Javascript we need to import this first then we can use.
There are two ways
1) Import in resources folder
2)Create Script and add it to the screen where you are using it.
Best
Arun
Hi Arun,
thanks for your anwser but our issue is different. The JavaScript code works fine when we call an action without input parameters... but we need to send some parameter to this action (a list in this case). It's at this point where we have the problem.
Notice that we are using ODC, not O11
Thanks!
Hi!
It's a good point of view! This workarround allow us to send a "structure" serialized and the deserialized in the final action... For now, we'll adopt this solution!
Thanks !
Solution suggested by jose is good fit in this case.
If JS not throwing any error when you send string as input parameter instead of list.
Share value as comma seperated in string and inside the action split it using String_Split function which will you give list at the end.
Thanks