Metadata Service Exception: Option with ID -1 unknown

A colleague started to develop a report in Visual Studio and experienced a strange exception when selecting a query as dataset. It said that an exception occurred in the metadata service >SOMEFIELD option with ID -1 was not recognized

image

A look at the table being part of the query reveled the reason for this problem. The filed on the table is based on an extended datatype, but this datatype was deleted a while ago. However on a first look the field looks okay.

image

The table does compile without errors and incremental IL succeeds(!)

image

As soon as your select the fields enum property in the property window, you’ll see that the datatype is missing.

image

Set the compiler level up to 4 in order to get best practice errors displayed. It tells your that the field has an unknown type (BP:100) and that each field should be defined using a type.

image

Advertisements

Über erpcoder
Software Engineer and Dynamics AX enthusiast working in Research & Development for InsideAx

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s

%d Bloggern gefällt das: