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
JaxBeachJaxBeach 

Need help with a cross object field update rule

Hi, 

 

I have two custom objects - one parent (BVP), one child (BVP Awards) in master detail relationship.

 

The child object lists amounts of government funded awards based on calendar year

I would like to update the parent record with the $ amounts from the year that matches the current year.

 

I've got the BVP Awards as Ojbect and the field to update on BVP Object - field is total proposed amount, but I'm not sure how to create a formula that says if the year field equals the current year, update the total proppsed amount from that record.  Does that make sense? 

 

Ex. 

 

# 001      2012         $11,356.68  Update this amount from record #001.

#002      2011         $15,752.36

 

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
@anilbathula@@anilbathula@
Hi JaxBeach

In your condition your assigning a Pick list value with formula so ,it wont give you the exact result. Because the formula will be failed you need to compare the year with the value present in the field then it will work.

Year Equals YEAR(TODAY()) This never works in the filter criteria.

Try this

Year Equals 2012 This will work perfect.

All Answers

sandeep@Salesforcesandeep@Salesforce

See first thing that we  can not create formula field on Parent objec to get values from child object so here we can use roll up summary. 

Please create a Rollup summary field(Number or currency type depends  on type of amount field on cutom object)

where we can keep condition year == current year.

 

Please let me know in case of further help

JaxBeachJaxBeach
Thanks. That makes sense.

I put year equals current year and didn't get any syntax errors but it is not updating the field.

Karon "KK" Kennerknecht
THE SAFARILAND GROUP
Channels & Salesforce.com Manager
13386 International Parkway
Jacksonville, FL 32218
Office: (904) 741-1764

karon.kennerknecht@safariland.com

[sf_cert_adm_rgb4]
________________________________________________________
Follow us at:
[cid:image010.png@01CC783D.C74B49C0] [cid:image011.png@01CC783D.C74B49C0] [cid:image012.png@01CC783D.C74B49C0] [cid:image013.png@01CC783D.C74B49C0]
sandeep@Salesforcesandeep@Salesforce

Did you create Roll up summary if not please roll up summary field. I have implemented similar problem so to get screen shot it please click on below link: 

Similar example

 

Here I am rolling up one numerical field value from child to Parent where child is married.  and in your case you need to roll up Award amount field where child award object 's year is current year YEAR(TODAY())

 

JaxBeachJaxBeach

I did create a roll up summary field.  I only had "current year" in the value and I switched it to YEAR(TODAY()), but it still didn't update.   Ive attached a link to view the screen shots.

 

 

Roll Up Summary

 

Thanks so much for your help with this.

@anilbathula@@anilbathula@
Hi JaxBeach

In your condition your assigning a Pick list value with formula so ,it wont give you the exact result. Because the formula will be failed you need to compare the year with the value present in the field then it will work.

Year Equals YEAR(TODAY()) This never works in the filter criteria.

Try this

Year Equals 2012 This will work perfect.
This was selected as the best answer
sandeep@Salesforcesandeep@Salesforce

You can check your rollup summary formula with static value to make sure your rule is working fine but you should not keep static values in to filter this should be dynamic. let me check it at my end.