function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
YashasviYashasvi 

Can you please help me with a Field Update Action?

Hi,
I'm trying to update a Text Field (Address__c) in a Custom Object (Qualification__c) with BillingAddress in its lookup Account Field (Company__c). For this I have created a formula field (Billing_Address__c) in Account object which pulls the data from BillingAddress.

Then, I have created a workflow rule on Qualification__c object.
Rule Criteria = " Qualification: Address EQUALS null ", and
Evaluation Criteria = "Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria".
A Field Update Action associated with the Rule is as below:
Field to Update = Qualification: Address
Field Data type = Text
Formula Value = " Company__r.Billing_Address__c ".

For testing, I have created a Qualification record with Address__c leaving empty, but the field is not being updated with Billing_Address__c as stated. I request you to help me with this.
Best Answer chosen by Yashasvi
AMIT KAMBOJAMIT KAMBOJ

Hi Yashasvi,

Please check these.

(i)
Check if the data type ( field length etc ) are supportive to stamp value of address from Company__r.Billing_Address__c  to Address 
Check if Address has different data type ? or this is longer than Company__r.Billing_Address__c  in length

(ii)
I created a WF rule to test and works fine now me. Just to check. Can you select the option 2 of the evaluation criteria
and change the existing record and see is this works ? If this works try with option 1 if that works that means criteria
of 3 is having issues. Check syntax.

    Evaluation Criteria:  Evaluate the rule when a record is:
    1.) created
    2.) created, and every time it’s edited
    3.) created, and any time it’s edited to subsequently meet criteria
    
(iii) In the log file please check the value of this 'WF_RULE_NOT_EVALUATED'
if this exists that means criteria is not met. 

If this helps in resolving this issue then please mark this answer as solution.

Thanks
Amit

All Answers

AMIT KAMBOJAMIT KAMBOJ

Hi Yashasvi,

Please check these.

(i)
Check if the data type ( field length etc ) are supportive to stamp value of address from Company__r.Billing_Address__c  to Address 
Check if Address has different data type ? or this is longer than Company__r.Billing_Address__c  in length

(ii)
I created a WF rule to test and works fine now me. Just to check. Can you select the option 2 of the evaluation criteria
and change the existing record and see is this works ? If this works try with option 1 if that works that means criteria
of 3 is having issues. Check syntax.

    Evaluation Criteria:  Evaluate the rule when a record is:
    1.) created
    2.) created, and every time it’s edited
    3.) created, and any time it’s edited to subsequently meet criteria
    
(iii) In the log file please check the value of this 'WF_RULE_NOT_EVALUATED'
if this exists that means criteria is not met. 

If this helps in resolving this issue then please mark this answer as solution.

Thanks
Amit
This was selected as the best answer
YashasviYashasvi
Hi Amit,

I appreciate your time to look into my issue. As per the checklist you've mentioned,
(i) Address__c data type is Text (255), and the Billing_Address__c formula return type is also Text. So, this shouldn't be a problem.
(ii) None of the evaluation criteria is working in my case which is odd.
(iii) Debug Log shows "Success", but still can't get the field updated.

Thanks again.
 
AMIT KAMBOJAMIT KAMBOJ

Hi Yashasvi,

There is a button 'Activate' on workflow rule. Can you please make sure it is activated. There is a check box 'Active'
If this helps in resolving this issue then please mark this answer as solution.

Thanks
Amit

 

YashasviYashasvi
Yes, the workflow rule was active. I tried changing the rule criteria, but still it isn't working. I'm trying to figure out why. I need someones help to sort it out. Thank you.
YashasviYashasvi
Hi Amit,

I just checked the debug log, it says workflow rule not evaluated. Can you please say what might be the reson for that?
Log details are as follows:
EXECUTION_STARTED
CODE_UNIT_STARTED|[EXTERNAL]|Workflow:01IM0000000DvT4
WF_RULE_EVAL_BEGIN|Workflow
WF_CRITERIA_BEGIN|[Qualification: Test Address-1 a00M0000004knko]|Address Update|01QM00000009b71|ON_CREATE_OR_TRIGGERING_UPDATE|0
WF_RULE_NOT_EVALUATED
WF_SPOOL_ACTION_BEGIN|Workflow
WF_ACTION| None

I have tested changing the rule such that the criteria evaluates to false. It works fine. But, when I make the criteria evaluating to true, Log says workflow rule not evaluated.

Please help me.
Thanks much.
YashasviYashasvi
Hi Amit,

I changed the rule to " NOT( ISBLANK(Company__r.Billing_Address__c) ) " and Evaluation Criteria to " Every time a record is created, and every time it’s edited. " And it worked.
It was an issue with the rule evauation.

Thank you for your help so far.