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
bathybathy 

Need ideas on how to implement a requirement

hi Folks,

We have a requirement with a custom object called Location_Report__c. This location report will have multiple projects ranging from 1 to 12.  I want a suggestion from you guys if we should use one to many relationship i.e., creating a project as a child object to location report or using VF page to select number of multiple projects and then dynamically display the input fields based on the number of projects selected.
And the main requirement is all the fields in the child objects must be displayed on the parent object page layout as a different section. And every time the project is edited then the corresponding section in the location report must be reflected. Sometimes these projects will be deleted as well. I am not sure how to implement this. Does any one have any ideas?

Thanks,
Bathy.
PratikPratik (Salesforce Developers) 
Hi Bathy,

As it's a one to many relationship, you can have Location Report as parent and Project as child. If you want strong relationship as to have sharing of project controlled by Location and if Location gets deleted then corresponding Projects should also be deleted then go for Master-child else go for Lookup relationship.

The fields of project you can either roll(if master child) up or write formulas to have it on Location report.

Hope this will help you.

Thanks,
Pratik
bathybathy
Thanks for your reply Pratik. But how can I edit corresponding Project Section on the Location Report whenever a Project is edited or deleted?

Thanks,

Bathy.