0

I am doing some mockup exams for the certification. There is a question saying:

An sObject named Application__c has a lookup relationship to another sObject named Position__c. Both Application__c and Position__c have a picklist field named Status__c. When the Status__c field on Position__c is updated, the Status__c fields on Application__c needs to be populated automatically with the same value, and execute a workflow rule on Application__c. How can a developer accomplish this?

And the possible answers are:

A) By changing the Application__c.Status__c into a roll-up summary field

B) By configuring a cross-object field update with a workflow

C) By using an Apex trigger with a DML operation

D) By changing the Application__c.Status__c into a formula field.

The correct answer is D, change status into a formula field. But we were not able to reproduce it. There is also a thread about it here. What we believe, the correct answer should be C, an Apex Trigger.

Resource: https://developer.salesforce.com/forums/?id=906F000000092XvIAI

EDIT:

Our only concern is that in the question it specifies that a workflow on child must be triggered when the parent picklist value is changed. As described in the above link, workflows are not triggered on formula field value update, as the value is calculated on run time and not stored in the database.

  • 2
    I'm very skeptical of trying to interpret mock certification resources because (a) we as a community cannot always determine whether we are looking at real or simulated questions, and (b) we're not in the heads of the resource authors. In this case, I would write this off as a poorly framed or plain incorrect question. – David Reed Apr 1 at 14:36
  • 2
    I can't see how D would be correct as the WFR would never trigger on Application__c – cropredy Apr 1 at 18:04
  • I guess you guys are right, so that confirms our thoughts. I will add this as an answer, thanks a lot for your confirmation! – Charis Moutafidis Apr 1 at 18:56
0

As @David Reed and @cropredy clarified, D is an incorrect answer. A workflow would never trigger with the change of a formula field. So the correct answer is C, a trigger is needed in order implement the flow described in the question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.