Skip to main content
Question

Getting INVALID_VALUE_FOR_PROPERTY error


Forum|alt.badge.img+2

Hi, 

When I pass the value( it's a enumeration data type) as parameter to function call .I'm getting this error.Can someone explain why we get INVALID_VALUE_FOR_PROPERTY error.

 

("error":{"code":"ODATA_PROVIDER_ERROR", "message":"An internal server error occurred. Contact administrator.", "details": [{"code":"INVALID_VALUE_FOR PROPERTY", "message":"Invalid value for property 'Status'."}]}}

Charith Epitawatta
Ultimate Hero (Employee)
Forum|alt.badge.img+31

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? 


Jonas Feigl
Superhero (Employee)
Forum|alt.badge.img+20
  • Superhero (Employee)
  • January 11, 2024

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.

 

 


Forum|alt.badge.img+1
  • Do Gooder (Partner)
  • January 19, 2024

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"


Jonas Feigl
Superhero (Employee)
Forum|alt.badge.img+20
  • Superhero (Employee)
  • January 19, 2024

@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.


Forum|alt.badge.img+1
  • Do Gooder (Partner)
  • January 22, 2024

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.


Jonas Feigl
Superhero (Employee)
Forum|alt.badge.img+20
  • Superhero (Employee)
  • January 22, 2024

@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"


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings