I have a workflow that creates a User once a Contact is created. (Formula is below, and Target Entity is Contact)
How can I assign this User that I just created to the Contact that triggered its creation?? I tried many things including
but nothing worked till now (the Assigned User is not being shown in 'Assigned User' field in the Contact record)
Code:
$emailAddress = string\substring(entity\attribute(emailAddress), 0); $userName = string\match($emailAddress, '/([^@]+)/'); $password = password\generate(); $hash = password\hash($password); $userId = record\create( 'User', 'userName', $userName, 'password', $hash 'emailAddress', $emailAddress );
Code:
assignedUserId = $userId
Comment