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
Sarah Chao 15Sarah Chao 15 

Updating Parent Account Status from Child Account Status

Hello smart people,

In our Salesforce instance, we have it set up with parent accounts to be the SCHOOL, and the child account as the CLASSROOMS. We would like to have it that if the field "Active Status" of the CLASSROOM is changed to "Inactive" [picklist] for example, then the SCHOOL account will automatically be changed to "Inactive" [picklist] The School Account and Classroom Account have a master-detail relationship. 

I'm doing research and some people say I can use Process Builder for this, and some say I need to write validation rules and some say Workflow? Can you tell me which is the easiest way to accomplish this?

If it's for validation rules, what type of formula can I write? Right now, I have this below but it doesn't seem to be working?

AND(ISPICKVAL(  Active_Status__c , "Inactive"),
ISPICKVAL(  Parent.Active_Status__c , "Active") )

Thank you for all your help in advance!! 
Best Answer chosen by Sarah Chao 15
UC InnovationUC Innovation
Hi Sarah, Patcs_1

Actually it is possible to update parents from the child using process builder. Check this post for a step by step guide on how to accomplish this:

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

Your situation is slightly different from that post, but it should be a good reference for you to get started. Let me know if you need any extra help!

Good luck!

All Answers

Patcs_1Patcs_1
Hi

What are you trying to achieve? if you want the record to be update automatically then go for process builder. if you want the user to pick the picklist values (inactive or active) then go for validation rules. validation rules will throw an error where as process builder will update the record automatically.

I have a question is the parent(school) account is inactive then child(classroom) account should also be inactive right? am I understood ur question correctly?

Thanks
Sarah Chao 15Sarah Chao 15
Hi! I want the record to be updated automatically! So, I assume Process Builder is the way to go? 

It's the other way around, I was hoping to see if we changed the Child (Classroom) account record to "inactive" then the Parent (school) record will automatically be inactive as well. Is that possible? 

I tried Process Builder, but don't know which account I should be updating. There's an object called Parent Account ID - is that what I'm looking for? But it doesn't seem to give me the option to update the Status.
Patcs_1Patcs_1
Hi Sarah

Updating from the child to parent is not possible whereas, Parent to child is possible in process builder. if you still wants to go with child to parent update then you can go via trigger.

Thanks
 
SalesFORCE_enFORCErSalesFORCE_enFORCEr
Process Builder will work in your situation. While selecting Record Update, choose Related Records.
UC InnovationUC Innovation
Hi Sarah, Patcs_1

Actually it is possible to update parents from the child using process builder. Check this post for a step by step guide on how to accomplish this:

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

Your situation is slightly different from that post, but it should be a good reference for you to get started. Let me know if you need any extra help!

Good luck!
This was selected as the best answer
Sarah Chao 15Sarah Chao 15
Thanks everyone!

Shalabh_enFORCEr: Thank you! I chose Related Records - if I want the Parent Account, do I choose Parent Account ID? I don't see another option to link it to Parent Account. There's also a Parent Account ID (with an arrow) but it still doesn't bring me to the "Active Status" field.

UC Innovation: Thank you! Is the Parent Record Relationshpi is not null thing necessary in my case? Trying to follow along and not sure if it's working the same way.

Patcs_1: Thank you! How would it work via Trigger? Is this something I would need to code? 
Sarah Chao 15Sarah Chao 15
Never mind - it worked! I realized I had a few validation rules in place that disrupted the process, but process builder is the way to go! Thanks so much!!
E-School ERPE-School ERP
If you are looking for an Advance School Management Software which has 30+ modules than you can try this
School SoftwareSchool Software
School Software provides the best features & Modules to manage your day to day school work. Looking for the best school management software try School Software.