Skip to main content
Became Hot Network Question
corrected v rule formula
Source Link
Thomas Taylor
  • 5.9k
  • 25
  • 45

I have a scheduled apex job which updates a field which is controlled by a validation rule as follows:

AND(
    Not(ISNEW()), 
    $Profile.Name != "System Administrator",
    ISCHANGED(theFieldInQuestion)
)

This validation rule prevents anyone from changing the value in theFieldInQuestion UNLESS that person is a System Administrator.

The scheduler runs as system, according to the documentation located here:

https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=0

My question is : What can I add to this AND clause in the validation rule which would allow the Scheduled Apex Job to update theFieldInQuestion ?

I have a scheduled apex job which updates a field which is controlled by a validation rule as follows:

AND(
    Not(ISNEW()), 
    $Profile.Name != "System Administrator"
    ISCHANGED(theFieldInQuestion)
)

This validation rule prevents anyone from changing the value in theFieldInQuestion UNLESS that person is a System Administrator.

The scheduler runs as system, according to the documentation located here:

https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=0

My question is : What can I add to this AND clause in the validation rule which would allow the Scheduled Apex Job to update theFieldInQuestion ?

I have a scheduled apex job which updates a field which is controlled by a validation rule as follows:

AND(
    Not(ISNEW()), 
    $Profile.Name != "System Administrator",
    ISCHANGED(theFieldInQuestion)
)

This validation rule prevents anyone from changing the value in theFieldInQuestion UNLESS that person is a System Administrator.

The scheduler runs as system, according to the documentation located here:

https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=0

My question is : What can I add to this AND clause in the validation rule which would allow the Scheduled Apex Job to update theFieldInQuestion ?

added 26 characters in body
Source Link
Vijay Ganji
  • 6.7k
  • 3
  • 15
  • 31

I have a scheduled apex job which updates a field which is controlled by a validation rule as follows:

AND( Not(ISNEW()), $Profile.Name != "System Administrator" ISCHANGED(theFieldInQuestion) )

AND(
    Not(ISNEW()), 
    $Profile.Name != "System Administrator"
    ISCHANGED(theFieldInQuestion)
)

This validation rule prevents anyone from changing the value in theFieldInQuestion UNLESS that person is a System Administrator.

The scheduler runs as system, according to the documentation located here: https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=0

https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=0

My question is : What can I add to this AND clause in the validation rule which would allow the Scheduled Apex Job to update theFieldInQuestion ?

I have a scheduled apex job which updates a field which is controlled by a validation rule as follows:

AND( Not(ISNEW()), $Profile.Name != "System Administrator" ISCHANGED(theFieldInQuestion) )

This validation rule prevents anyone from changing the value in theFieldInQuestion UNLESS that person is a System Administrator.

The scheduler runs as system, according to the documentation located here: https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=0

My question is : What can I add to this AND clause in the validation rule which would allow the Scheduled Apex Job to update theFieldInQuestion ?

I have a scheduled apex job which updates a field which is controlled by a validation rule as follows:

AND(
    Not(ISNEW()), 
    $Profile.Name != "System Administrator"
    ISCHANGED(theFieldInQuestion)
)

This validation rule prevents anyone from changing the value in theFieldInQuestion UNLESS that person is a System Administrator.

The scheduler runs as system, according to the documentation located here:

https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=0

My question is : What can I add to this AND clause in the validation rule which would allow the Scheduled Apex Job to update theFieldInQuestion ?

Source Link

Validation rule Scheduled Apex

I have a scheduled apex job which updates a field which is controlled by a validation rule as follows:

AND( Not(ISNEW()), $Profile.Name != "System Administrator" ISCHANGED(theFieldInQuestion) )

This validation rule prevents anyone from changing the value in theFieldInQuestion UNLESS that person is a System Administrator.

The scheduler runs as system, according to the documentation located here: https://help.salesforce.com/articleView?id=code_schedule_batch_apex.htm&type=0

My question is : What can I add to this AND clause in the validation rule which would allow the Scheduled Apex Job to update theFieldInQuestion ?