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
developer srideveloper sri 

Need code logic (Trigger) for below requirement

Hello Professionals!!!!!

 

Here i need one logic to populate the sum of field values... please help me out in this. I will be very thankful to you

 

I have Quote object, Structure__c object and Bigmachine__c object.

Quote -- Structure__c                         >>>> Master Detail relationship
Quote -- Bigmachine__c                   >>>> Lookup relationship
Structure__c -- Bigmachine__c       >>>> Lookup relationship

On Quote I can create multiple "Structure" records and on "Structure" object, i have "scope" field of number data type.
On "Bigmachine" object i have "Total scope" field which needs to be populated as the sum of all the "scope" field values.

 

 

Hoping a favorable response.

 

 

Thank you!!!!!!!!

Sonam_SFDCSonam_SFDC
if I understand the setup correctly I would suggest the following -

1)Create a rollup summary field on Quote which gets the total of all scopes
2)Create a formula field on bigmachine__c and get the value of rollup summary field on Quote to this object so you can display the same.