Hi @Haru,
It looks like you have passed an invalid value to the Projection function as a parameter or the way you have passed the parameter is incorrect. Could you share more details about the Projection you are trying to invoke and how you pass parameters to the Projection function?
Hi Hari,
When passing enumeration values as part of the URL they have to be type-casted.
Please see explanation of what you have to do here:
https://support.ifs.com/csm?id=kb_article_view&table=kb_knowledge&sys_kb_id=4ea29cec47aaf11c9d19b177436d43fd
In IFS Cloud 23R2 the generated API documentations have also been updated to now include the appropriate data type in the sample URL.
This also doesn’t work in the IFS Cloud web client when trying to pass a custom enumeration value as a parameter into a datasource function to dynamically populate a list of values. Customer instance redacted but you can see that the UL does have the data type but it still fails with the INVALID_VALUE_FOR_PROPERTY error
REQUEST uri "https://ifscloud-xxxxxxxxxxxxxxxxxxxxx/main/ifsapplications/projection/v1/CustomerOrderHandling.svc/DeliveryRouteFilter(CustomerNo='NHSBT22',ShipAddrNo='10',ShowAllRoutes=IfsApp.CustomerOrderHandling.CfEnum_FndYesNo'CfEnum_YES')?$skip=0&$top=101&odata-debug=json"
@JOATUK I’m a bit confused about your example. If “DeliveryRouteFilter” is a Core method then passing “CfEnum_FndYesNo” can never be the right data type anyway as the “CfEnum_” enumerations are just for custom fields. Not sure what you are trying to achieve exactly but I wouldn’t expect the call you have posted here to work.
Hi Jonas,
The DeiliveryRouteFilter is a Developer Studio Customisation. It works just fine if the value for show all routes comes via a text field. I tried adding show all routes as an enumeration via Developer Studio as well but it didn’t work. The only way I could get the URL in the ‘correct’ format was to add show all routes as a custom field using the normal enumeration type.
@JOATUK If DeliveryRouteFilter is a modification in Developer Studio then using enumeration type “IfsApp.CustomerOrderHandling.CfEnum_FndYesNo” will not work as that is a dynamically generated enumeration type for Custom Objects. If you have defined the enumeration in Developer Studio as “FndYesNo” what you will want to use the default enumeration type “IfsApp.CustomerOrderHandling.FndYesNo”. So your call should probably be as follows:
/main/ifsapplications/projection/v1/CustomerOrderHandling.svc/DeliveryRouteFilter(CustomerNo='NHSBT22',ShipAddrNo='10',ShowAllRoutes=IfsApp.CustomerOrderHandling.FndYesNo'Yes')?$skip=0&$top=101&odata-debug=json"