Testing this workflow scenario:
Entity : Account
Trigger : After save
When the record changes, I want to create a new Case for this account, with the name in the case description
How do I reference the attributeFetched('name') of the Account in order to do that?
I also tried to first create the case record, then relate.
Any suggestion? The case record gets created, but as far as I can debug the $caseId does not have the ID of the generated Case record.
Entity : Account
Trigger : After save
When the record changes, I want to create a new Case for this account, with the name in the case description
How do I reference the attributeFetched('name') of the Account in order to do that?
I also tried to first create the case record, then relate.
Code:
$caseId = record\create('Case', 'name', entity\attributeFetched('name')); $accountId = entity\attributeFetched('id'); record\relate('Account', $accountId, 'case', $caseId);
Comment