Sage CRM 2020: How do you set a null value via (SOAP) Web Services?

Assuming that Values are passed as strings via webservices we can therefore represent null as an empty string.

The code below is modified extract of code from the Web Services Test Harness that I use in my training classes. If I want to set the comp_website address field to null I only need to pass in an empty string. In the database this will be saved as a null.

Note:  You can find the latest version of the test harness here:

ewarebase[] CRMBase;
updateresult CRMUpdateResult;
CRMBase = new ewarebase[1];
CRMCompany.companyid = int.Parse(textboxComp_Companyid.Text);
CRMCompany.companyidSpecified = true; = textBoxComp_Name.Text;
// = textBoxComp_WebSite.Text; = "";
CRMCompany.source = comboBox1.Text;
CRMBase[0] = CRMCompany;
CRMUpdateResult = CRM.update("company", CRMBase);

In my C# project I can either receive the 'null' from the screen = textBoxComp_WebSite.Text;

Or I can set the null in my code = "";

Either way this results in the actual XML passed to the server will be the same.

Note: I have assumed the setting "Dropdown fields as strings in WSDL file:Yes".