Setting ExpiryDate to null
Wednesday, July 20, 2016 at 04:58amHi,
I'm having issues setting the expiration date to null.
These are the functions I'm calling:
EslClient eslClient = getEslClient(companyId);
PackageId pkgId = new PackageId(packageId);
DocumentPackage dp = eslClient.GetPackage(pkgId);
dp.ExpiryDate = null;
eslClient.UpdatePackage(pkgId, dp);
After doing that, it doesn't update and continues with whatever the previous ExpiryDate was. If I call the same function but with a date value instead of null, it updates accordingly.
Is there a different process I need to do in order to update the date to null?
Thanks,
Fernando
Reply to: Setting ExpiryDate to null
Wednesday, July 20, 2016 at 05:29amReply to: Setting ExpiryDate to null
Wednesday, July 20, 2016 at 05:45amReply to: Setting ExpiryDate to null
Wednesday, July 20, 2016 at 06:44amReply to: Setting ExpiryDate to null
Wednesday, August 19, 2020 at 08:22amHas the issue of setting the Expiration Date to null been fixed in the .Net SDK yet or is it scheduled to be fixed? We are running 7.2 on Prem and still seeing this issue. We have implemented the workaround but this requires some ugly code on our side.
Reply to: Has the issue of setting the…
Thursday, September 3, 2020 at 03:17pmHi Tricia,
This is caused by the Newtonsoft Null Value Handling which defaults to Ignore the whole SDK wide.
jsonSerializerSettings.NullValueHandling = NullValueHandling.Ignore;
And there's no additional annotation added on the due property, which I believe is still the case for the latest SDK.
If you preferred, I can raise a support ticket on your behalf and asking R&D team to fix this. However, for .NET SDK in particular, because the repository has been moved since version 11.33 and we've seen rebranding for some space and class names. An upgrade to the latest version could require code change at your side.
(Check my blog "Upgrade in .NET SDK" for more information)
Duo