web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :

Working with CLR null references

Volodymyr Giginiak Profile Picture Volodymyr Giginiak Microsoft Employee
In C# if a method has return value of type string it is possible to return null. If you'll try to use this method from AX you'll get exception because null value cannot be marshaled to X++ string (it is not nullable).
To avoid this failure there is a possibility to validate if returned value is null by using CLRInterop::isNull() method.
Example:
if (ClrInterop::isNull(myCLRObject.method1()))
{
    info("Null value was returned");
}

This was originally posted here.

Comments

*This post is locked for comments