Serialization of enum types

Situation: A web service hosted on Dynamics AX 2012 AOS; it finds some data in database on demand and returns them. The type of one of the fields is UtilElementType enum. Problem: If no record is found, system throws the exception “Enum value ‘0’ is invalid for type ‘Dynamics.Ax.Application.UtilElementType’ and cannot be serialized.” Analysis: Fortunately, …

Continue reading ‘Serialization of enum types’ »

Serializace výčtových typů

Situace: Webová služba hostovaná na AOS Dynamics AX 2012, na požádání najde určitá data v databázi a vrátí je. Typ jednoho z polí je výčtový typ UtilElementType. Problém: Není-li nalezen žádný záznam, systém vyhodí výjimku “Enum value ‘0’ is invalid for type ‘Dynamics.Ax.Application.UtilElementType’ and cannot be serialized.” (“Hodnota ‘0’ není platná pro výčtový typ ‘Dynamics.Ax.Application.UtilElementType’ …

Continue reading ‘Serializace výčtových typů’ »