Dynamics AIF : Null vs Empty string

Today I experienced that when using AIF through web services, you have to pay attention to the difference between an empty string and a null value.

We created a service for inventory locations and we had the InventLocationId filled in by the AIF. But when calling the service we received an error everytime telling us that the InventLocationId was mandatory but missing. (Although it was in the exemption list and there was code to fill it in)

Then we discovered that the calling .NET application specified the “” value on the inventLocationId instead of the NULL value. This results in a different XML file and the AIF thinks that the InventLocationId is filled in but with an empty value.

XML file when using null value :


XML file when using empty string value :

AIF Empty String Value