Hi,
We created a taskboard and there we are created some tasks without resources. Now if later we came to this page and try to update these task with some resources assigned to them its giving us the error.
Use Case : Task created without resources assigned and later wants to update them with resources assigning.
Error : TypeError: Cannot read properties of null (reading 'id')
We are using below code to add/update resources into task
record.set('name', taskName);
record.set('opportunityService', taskData.opportunityService);
record.set('priority', taskData.priority);
record.set('description', taskData.description);
record.set('resources', taskData.salesPersonId ? [taskData.salesPersonId] : []);record.set('resources', taskData.salesPersonId ? [taskData.salesPersonId] : []);This line gives us the error.
Please suggest how to fix this and assign resource to already created task.
Thanks