PLAT-ADMN-202 practice question 14 of 35
Ann app builder has been to display an overdue date that is two months after a tasks due date. Which approach should the app builder take?
Full set: 311 questionsDomain Service and Support Applications
The most accurate and efficient method to calculate a date that is a specific number of months from another date is by using a formula field with the ADDMONTHS() function. This function is designed to correctly handle the varying lengths of months and leap years. For example, ADDMONTHS(DueDate, 2) will add exactly two calendar months to the DueDate field, ensuring precision regardless of whether the starting month has 28, 30, or 31 days. A formula field is appropriate as the value is always derived from another field on the same record.
A. Use process builder and set overdue date equal to Due Date + ((365/12)2): This calculation is an approximation and will not yield an accurate calendar date. Process Builder is also less efficient than a formula field for this requirement.
B. Create a formula field using Due Date + 60: Adding a fixed number of days (60) is not equivalent to adding two months, as months have different lengths. This will lead to incorrect dates.
C. Use process builder and set overdue Date equal to Due Date + 60: This shares the same logical flaw as option B; adding 60 days is an inaccurate way to calculate two months. Using Process Builder does not correct the faulty calculation.
1. Salesforce Help Documentation, "Formula Operators and Functions A–Z": The ADDMONTHS(date, num) function is explicitly defined for this purpose. The documentation states, "Adds num months to date... If the resulting month has fewer days than the starting month, the function returns the last day of the resulting month." This confirms it is the correct tool for adding calendar months.
Source: Salesforce Help, "Formula Operators and Functions A–Z", under the ADDMONTHS entry.
2. Salesforce Help Documentation, "Date and Date/Time Functions": This page details functions for handling date values. It lists ADDMONTHS as the standard function for adding or subtracting a specific number of months from a date, reinforcing its suitability over simple arithmetic addition of days.
Source: Salesforce Help, "Date and Date/Time Functions".
3. Salesforce Architects, "Record-Triggered Automation Decision Guide": This guide helps architects and builders choose the right tool. For a requirement to calculate and display a value on the same record based on one of its fields, a formula field is recommended for its simplicity and real-time execution before a record is saved, making it more efficient than a record-triggered flow (the successor to Process Builder).
Source: Salesforce Architects, "Record-Triggered Automation", section "Before-Save: Update fields on the record".
Keep practicing
Take the free PLAT-ADMN-202 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other PLAT-ADMN-202 practice questions
- Question 1Universal Containers manages leads in a Lead qualification queue where sales reps can acc…
- Question 2Ursa Major Solar wants to see the Type field from the parent object Galaxy listed on the …
- Question 3Universal Containers (UC) utilizes two custom picklist fields called sales_Organization__…
- Question 4Which two features can be used to allow users to access Flows? Choose 2 answers
- Question 5Universal Containers wants some enhancements on its Opportunity page layout to improve ef…
- Question 6A business user wants a quick way to edit a record's status and enter a custom due date f…
