Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Plat-Admn-202 Exam - Topic 5 Question 12 Discussion

Universal Containers uses a custom object called Projects. When managers Assign projects, they set a custom field on the Project record called Estimated Hours. Once set, users should be able to decrease but not increase the value. How can an app builder meet this requirement?
C) Create a validation rule that uses the PRIORVALUE function.
A) Create a validation rule that uses the ISCHANGED function.
B) Create a formula default value for the custom fiel
D) Create a formula field that uses the PREVGROUPVAL function.

Salesforce Plat-Admn-202 Exam - Topic 5 Question 12 Discussion

Actual exam question for Salesforce's Plat-Admn-202 exam
Question #: 12
Topic #: 5
[All Plat-Admn-202 Questions]

Universal Containers uses a custom object called Projects. When managers Assign projects, they set a custom field on the Project record called Estimated Hours. Once set, users should be able to decrease but not increase the value. How can an app builder meet this requirement?

Show Suggested Answer Hide Answer
Suggested Answer: C

The correct answer is C. Create a validation rule that uses the PRIORVALUE function.

The requirement is: once Estimated Hours is set, users can decrease the value but cannot increase it. A validation rule can compare the new value with the old value by using PRIORVALUE().

Example logic:

Estimated_Hours__c > PRIORVALUE(Estimated_Hours__c)

Salesforce documents PRIORVALUE() as the function used to return the previous value of a field, and Salesforce examples use it in validation rules to compare a changed value against the prior value.

A is incomplete because ISCHANGED() only detects that the field changed; it does not determine whether the value increased or decreased.

B is incorrect because a default value does not control later edits.

D is incorrect because PREVGROUPVAL() is used in reports, not validation rules.

===========


Contribute your Thoughts:

0/2000 characters
Leslie
4 days ago
C is the way to go! PRIORVALUE checks the old value.
upvoted 0 times
...
Kristal
9 days ago
I'm leaning towards the formula default value option, but I can't recall if that would actually enforce the decrease-only rule.
upvoted 0 times
...
Glendora
14 days ago
I feel like we practiced a similar question where we had to restrict field changes, and I think the validation rule was the right approach.
upvoted 0 times
...
Stephaine
19 days ago
I remember something about ISCHANGED, but I'm not sure if it applies here since we want to allow decreases only.
upvoted 0 times
...
Micah
24 days ago
I think we need to prevent increases in the Estimated Hours, so maybe a validation rule with PRIORVALUE could work?
upvoted 0 times
...

Save Cancel