Symptom
You have created a script and during the save/ activation, below error occured:-
Identifier is typed as 'Node(X.Root)'. Collection type is expected, where X is the custom business object name.
Environment
SAP Cloud Application Studio
SAP Business ByDesign
SAP Cloud for Customer
Reproducing the Issue
-
Login to SDK.
- Open the solution.
- Navigate to the script which you have created.
- Click on Activate.
- Error occured.
Cause
You are using Foreach loop in the script, but the type of the variable which you have declared is not of collection type.
Resolution
For using Foreach loop, the type of the field which you are trying to loop should be of collection/ structure type. For example, Node name which you have declared in your custom BO can used as the type for the field Z, and you can use foreach with this field.
Keywords
Error while activating the script error in action script error while using foreach loop Identifier is typed 'Node(BO.Root)' , KBA , collection type is expected , identifier is typed , identifier error when activating script , AP-RC-BDS-BO , ByDesign Studio BO definition/generation , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , Problem