I am trying to have my tasks be marked as completed with isclosed mapping to true because I need them to appear in an activity history SOQL query.
I am creating a task with the following field mappings and am very confused as to why isclosed is mapping to false. Doesnt "Completed" move isclosed to true.
'Subject' => '[Outreach][Out][Outbound][Gmail] Re: Invoice Purchasing',
'Description' => 'Running a test',
'ActivityDate' => Date.today()- 1,
'Status' => 'Completed',
'WhatId' => Opportunities[0].Id
After I insert the tasks, I am checking the following fields and finding the following results
System.debug(tasks[0].Status); --> Completed
System.debug(tasks[0].IsClosed); ---> False