• Hilarye Schoyt
  • NEWBIE
  • 10 Points
  • Member since 2023
  • Senior Salesforce Administrator
  • Oliver Wyman Actuarial


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

I have a doozy of a user story, and I'm stuck.  I will try to explain as best as I can. 

Objects in Question:
Account (Standard)  
Project (Custom) - Master Detail relation to Account.  
Project Services (Custom) -  Junction object between Service & Project.  
Service (Custom) - Just a list of services we offer that need to be linked to multiple other records.   
Current Services (Custom) - Junction object between service & account.

Each 'Account' can have multiple 'Projects' (Master Detail).  Each 'Project' can have multiple 'Services' (Junction Object).  Therefore each 'Account' can have multiple 'Services' (Junction Object).  

What I desperately need: When I relate a 'Service' record to a 'Project', through junction object 'Project Services', I need an identical relation to be created between 'Account' and 'Service', on junction object 'Current Services'.  Is this doable though a Flow or a Trigger?

EX:  'Account A' has just become an active client. User goes to create the new record 'Project 1' associated with 'Account A' on the custom 'Project' object.  While creating 'Project 1', user relates 'Service 1' & 'Service 2' to that project through junction object 'Project Services'.  At the same time a new record needs to be created on the junction object 'Current Services' relating that service to 'Account A'. Each 'Service' only need be added to 'Account A' once.

Think of this as a rollup of related 'Services' to the related 'Account' listed on a 'Project' record. End result being 'Account A' will always have a list of current services in a related list.

Help please?  I've been thinking about this for 3 straight days, and my brain hurts.  Feel free to ask clarifying questions if I make absolutely zero sense.

I've never written a trigger, so if that's my path, any advice or help would be much appreciated. 

I have a doozy of a user story, and I'm stuck.  I will try to explain as best as I can. 

Objects in Question:
Account (Standard)  
Project (Custom) - Master Detail relation to Account.  
Project Services (Custom) -  Junction object between Service & Project.  
Service (Custom) - Just a list of services we offer that need to be linked to multiple other records.   
Current Services (Custom) - Junction object between service & account.

Each 'Account' can have multiple 'Projects' (Master Detail).  Each 'Project' can have multiple 'Services' (Junction Object).  Therefore each 'Account' can have multiple 'Services' (Junction Object).  

What I desperately need: When I relate a 'Service' record to a 'Project', through junction object 'Project Services', I need an identical relation to be created between 'Account' and 'Service', on junction object 'Current Services'.  Is this doable though a Flow or a Trigger?

EX:  'Account A' has just become an active client. User goes to create the new record 'Project 1' associated with 'Account A' on the custom 'Project' object.  While creating 'Project 1', user relates 'Service 1' & 'Service 2' to that project through junction object 'Project Services'.  At the same time a new record needs to be created on the junction object 'Current Services' relating that service to 'Account A'. Each 'Service' only need be added to 'Account A' once.

Think of this as a rollup of related 'Services' to the related 'Account' listed on a 'Project' record. End result being 'Account A' will always have a list of current services in a related list.

Help please?  I've been thinking about this for 3 straight days, and my brain hurts.  Feel free to ask clarifying questions if I make absolutely zero sense.

I've never written a trigger, so if that's my path, any advice or help would be much appreciated.