NAV2018 : Unexpected value ‘String’ of type ‘Microsoft.Dynamics.Nav.CodeAnalysis.NavTypeKind’

When you work with NAV2018 extension, you may encounter an error that is difficult to figure out. This time, I encountered another one when trying to publish the extension. The app was compiled without any error, but it would error out when I tried to publish it.

The request for path /NAV/dev/apps?tenant=default&SchemaUpdateMode=synchronize failed with code 422. Reason: Unexpected value 'String' of type 'Microsoft.Dynamics.Nav.CodeAnalysis.NavTypeKind'

After some investigation, I managed to pinpoint the issue to Evaluate function. It looked like there is an issue when evaluating from a Joker value.

To fix this issue, you just need to wrap it using Format.

Evaluate(MyText, Format(MyFieldRef.Value()));

This issue is not there when you are using latest build of NAV 2018. If you are working with the older build, you can use this trick to fix it or you can upgrade to the latest build.

Hope that helps you if you have the same issue with NAV2018.

thatnavguy

Experienced NZ-based NAV Developer and Consultant with 15+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central. Passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *