Create a trigger based on resource person type
Hi,
We need to create a trigger based on the PersonType attribute of the Resource object. The logic should be as follows:
if(PersonType='EMP'){
setAttribute(newField_c,'Internal')}
else return null
Our goal is to ensure that when a Resource is created, if the PersonType is EMP, a custom field is populated with a specific value.
However, when we try to compose this trigger in App Composer (on the Resource object), we encounter the following error:
Error(1,4) : Unknown attribute name: PersonType for type: Resource
Is there a way to achieve this requirement? How can we access the PersonType attribute correctly?
Tagged:
0