Skip to main content
added 828 characters in body
Source Link
MikeA
  • 1.1k
  • 13
  • 29

There is a standard field for record owner that you can use. If I understand correctly, you want only the record owner to be able to edit the record. In that case, your Error Condition Formula would be simply

$User.Id  <>  OwnerId

To include Profiles, consider the solution from @sfdcfox. It means that you do not need to consider changes to Profile name, or different Ids in each sandbox for a new Profile until it is refreshed from Production.

If you choose not to, go to the Profile(s) that should be able to edit the record and get the Id of the Profile. Include them in the formula like this:

AND ( $User.Id <> OwnerId, $Profile.Id <> '00e30000001Ja3e', $Profile.Id <> '00e30000001Gs8e', $Profile.Id <> '00e30000001aFo2' )

AND (
    $User.Id  <>  OwnerId,
    $Profile.Id <> '00e30000001Ja3e',
    $Profile.Id <> '00e30000001Gs8e',
    $Profile.Id <> '00e30000001aFo2'
)

Using Profile Id is safer than using the name of the Profile since the name can be edited. If the Profiles that you want to include were already in Production when your sandbox was created, the Profile Id will be the same as it is in Production, so no need to modify the VR in each sandbox.

There is a standard field for record owner that you can use. If I understand correctly, you want only the record owner to be able to edit the record. In that case, your Error Condition Formula would be simply

$User.Id  <>  OwnerId

To include Profiles, consider the solution from @sfdcfox. It means that you do not need to consider changes to Profile name, or different Ids in each sandbox for a new Profile until it is refreshed from Production.

If you choose not to, go to the Profile(s) that should be able to edit the record and get the Id of the Profile. Include them in the formula like this:

AND ( $User.Id <> OwnerId, $Profile.Id <> '00e30000001Ja3e', $Profile.Id <> '00e30000001Gs8e', $Profile.Id <> '00e30000001aFo2' )

Using Profile Id is safer than using the name of the Profile since the name can be edited. If the Profiles that you want to include were already in Production when your sandbox was created, the Profile Id will be the same as it is in Production, so no need to modify the VR in each sandbox.

There is a standard field for record owner that you can use. If I understand correctly, you want only the record owner to be able to edit the record. In that case, your Error Condition Formula would be simply

$User.Id  <>  OwnerId

To include Profiles, consider the solution from @sfdcfox. It means that you do not need to consider changes to Profile name, or different Ids in each sandbox for a new Profile until it is refreshed from Production.

If you choose not to, go to the Profile(s) that should be able to edit the record and get the Id of the Profile. Include them in the formula like this:

AND (
    $User.Id  <>  OwnerId,
    $Profile.Id <> '00e30000001Ja3e',
    $Profile.Id <> '00e30000001Gs8e',
    $Profile.Id <> '00e30000001aFo2'
)

Using Profile Id is safer than using the name of the Profile since the name can be edited. If the Profiles that you want to include were already in Production when your sandbox was created, the Profile Id will be the same as it is in Production, so no need to modify the VR in each sandbox.

added 828 characters in body
Source Link
MikeA
  • 1.1k
  • 13
  • 29

There is a standard field for record owner that you can use. If I understand correctly, you want only the record owner to be able to edit the record. In that case, your Error Condition Formula would be simply

$User.Id  <>  OwnerId

To include Profiles, consider the solution from @sfdcfox. It means that you do not need to consider changes to Profile name, or different Ids in each sandbox for a new Profile until it is refreshed from Production.

If you choose not to, go to the Profile(s) that should be able to edit the record and get the Id of the Profile. Include them in the formula like this:

AND ( $User.Id <> OwnerId, $Profile.Id <> '00e30000001Ja3e', $Profile.Id <> '00e30000001Gs8e', $Profile.Id <> '00e30000001aFo2' )

Using Profile Id is safer than using the name of the Profile since the name can be edited. If the Profiles that you want to include were already in Production when your sandbox was created, the Profile Id will be the same as it is in Production, so no need to modify the VR in each sandbox.

There is a standard field for record owner that you can use. If I understand correctly, you want only the record owner to be able to edit the record. In that case, your Error Condition Formula would be simply

$User.Id  <>  OwnerId

There is a standard field for record owner that you can use. If I understand correctly, you want only the record owner to be able to edit the record. In that case, your Error Condition Formula would be simply

$User.Id  <>  OwnerId

To include Profiles, consider the solution from @sfdcfox. It means that you do not need to consider changes to Profile name, or different Ids in each sandbox for a new Profile until it is refreshed from Production.

If you choose not to, go to the Profile(s) that should be able to edit the record and get the Id of the Profile. Include them in the formula like this:

AND ( $User.Id <> OwnerId, $Profile.Id <> '00e30000001Ja3e', $Profile.Id <> '00e30000001Gs8e', $Profile.Id <> '00e30000001aFo2' )

Using Profile Id is safer than using the name of the Profile since the name can be edited. If the Profiles that you want to include were already in Production when your sandbox was created, the Profile Id will be the same as it is in Production, so no need to modify the VR in each sandbox.

deleted 18 characters in body
Source Link
Adrian Larson
  • 151.3k
  • 38
  • 247
  • 431

There is a standard field for record owner that you can use. If I understand correctly, you want only the record owner to be able to edit the record. In that case, your Error Condition Formula would be simply

$User.Id <> OwnerId

Thanks,

Mike.

$User.Id  <>  OwnerId

There is a standard field for record owner that you can use. If I understand correctly, you want only the record owner to be able to edit the record. In that case, your Error Condition Formula would be simply

$User.Id <> OwnerId

Thanks,

Mike.

There is a standard field for record owner that you can use. If I understand correctly, you want only the record owner to be able to edit the record. In that case, your Error Condition Formula would be simply

$User.Id  <>  OwnerId
Source Link
MikeA
  • 1.1k
  • 13
  • 29
Loading