Marc-André Bouchard
09/29/2023, 6:24 PMlet supportCaseId = supportCase.save();
and I have an InternalID in hand for use later.
I prepare my task the same way, and supply it the case ID like so: task.setValue({ fieldId: 'supportcase', value: supportCaseId });
Only, upon saving the task, I get hit with "You have entered an Invalid Field Value 21961989 for the following field: supportcase"
I'm not too sure what I'm doing wrong here. In my mind, I'm supplying the Case's InternalID, so in theory it should work, but in practice that's not the case. 🤔
Any clues?battk
09/29/2023, 6:37 PMbattk
09/29/2023, 6:41 PMMarc-André Bouchard
09/29/2023, 7:35 PMnumber
instead of the internalid
?battk
09/29/2023, 7:36 PMbattk
09/29/2023, 7:37 PMMarc-André Bouchard
09/29/2023, 7:38 PMbattk
09/29/2023, 7:39 PMMarc-André Bouchard
09/29/2023, 7:43 PMentity.setValue({ fieldId: 'stuff', value: value });
to fill in various mandatory fields.battk
09/29/2023, 7:45 PMbattk
09/29/2023, 7:45 PMbattk
09/29/2023, 7:46 PMMarc-André Bouchard
09/29/2023, 7:48 PM[...]
let supportCaseId = supportCase.save();
let task = record.create({ type: record.Type.TASK, isDynamic: true });
let today = new Date();
today.setHours(0,0,0,0);
task.setValue({ fieldId: 'startdate', value: today });
task.setValue({ fieldId: 'duedate', value: today });
task.setValue({ fieldId: 'supportcase', value: supportCaseId });
let taskId = task.save();
The support case gets created successfully, so I omit whatever's before that.battk
09/29/2023, 7:50 PMbattk
09/29/2023, 7:51 PMbattk
09/29/2023, 7:51 PMbattk
09/29/2023, 7:51 PMMarc-André Bouchard
09/29/2023, 7:56 PMMarc-André Bouchard
09/29/2023, 8:03 PMMarc-André Bouchard
09/29/2023, 8:17 PM