function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tino2008tino2008 

how to clear date?

Updating a date field on an account with a null value will not clear/reset the date field
so it wont be visible on the account screen.
What possibilities do I have?
 
Regards,
ValentinoRomeli
 
    webService static string UpdateAccountDates(string nr, date InService, date OutService)
    {
        try {
            Account acc = [select AC_SINDS__c,AC_EX_SINDS__c from Account where AC_AF_INI_ID__c = :nr];

            acc.AC_SINDS__c = InService;
            acc.AC_EX_SINDS__c = OutService;
           
            update acc;    
 
valentino rijhevalentino rijhe

Does anyone know?

Clearing the date with

acc.AC_SINDS__c = null;

doesnt work.

Thx in advance
Regard,
Valentino Rijhen