I have a search component on Event record that looks up two sets of object records; Contact, and User.
When a search result is clicked, a record is created in EventRelation object. The creation of this record fails if a user record has been selected, this is because I set field IsParent on EventRelation to TRUE. If the search result clicked is a contact, the EventRelation record is created without issue.
I want to add some logic to the actions that differ when selecting a User and Contact record.
If an EventRelation record is being created with a Contact; set IsParent to FALSE
If an EventRelation record is being created with a User; set IsParent to TRUE
What I’ve built so far isn’t working, the EventRelation record gets created, but the Branch logic doesn’t seem to be working, or something related isn’t working…i’m not too sure.
The branch logic should be checking if the UserId from the returned object is blank, if it’s blank then the IsParent field should be updated to TRUE.
I’d like to know what I am doing wrong, so this can be fixed? Or am I going to have to use two separate lookup fields, one for User records, the other for Contacts?