function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Carrlos BoydCarrlos Boyd 

Prevent record change but allow record creation with VR

I have a validation rule that prevents users from editing a record if they are not the owner or if they do not have a System Administrator profile. The problem is that it also prevents the creation of a new record because of a Process Builder process. The user triggering the new record is not the person that will own it. I tried to use ISNEW in the example code below but it did not work. Appreciate the help.
AND( 
 OwnerId <> $User.Id, 
 $Profile.Name <> 'System Administrator',
 NOT(ISCHANGED(OwnerId)),
 NOT(ISNEW())
)


 
Manj_SFDCManj_SFDC
Hi Carlos, can you help me to understand what logic do you have in process builder
Carrlos BoydCarrlos Boyd
In Process Builder I have a process that automatically creates a record on customobject2 if the owner of customobject1 selects specific values on their record. On this customobject1 record, there is a lookup to another user who will become owner of the new customobject2 record once all the correct values are selected by the current user. But I think that because of my current validation rule, the current user is prohibited from creating the record because they are not the eventual owner. The error message that is emailed to me says a record cannot be created because the user is not the owner of the record.