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
shaik riyaz 13shaik riyaz 13 

Hi. Can anyone help me on this task. I am new to salesforce

  1. An account can have multiple child contacts. A contact can have multiple opportunities. Provide a revenue field(currency) on opportunity. Cumulative opportunity revenue should be reflected on respective contact. Cumulative contact revenue should be reflected on respective account. Make sure an account’s revenue should not cross 1 Million and throw an error if it crosses.
  2. An account can have multiple child contacts. A contact can have multiple opportunities. Provide a revenue field(currency) on opportunity. Cumulative opportunity revenue should be reflected on respective contact. Cumulative contact revenue should be reflected on respective account. Make sure an account’s revenue should not cross 1 Million and throw an error if it crosses.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Shaik,

Just create a currency field on Opportunity called Revenue. By default Account can have multiple contacts and Contacts can have multiple opportunities.

Create a Roll up summary field on contact which will roll up the sum of revenvue to the contact.

Similary create on Account as well.

Please let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks
 
shaik riyaz 13shaik riyaz 13
Hi Sai, thank you.
there is a relation between account and contact, but contact and opportunity don't have any relation in it. can you clarify it once please
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Shaik,

Yeah sorry for confusing you. You need to create a field on opportunity called Contact which is master detail . Then you will be able to use the roll up summary field.

Thanks,
 
shaik riyaz 13shaik riyaz 13
Yeah, but I cannot able to see the master-detail lookup in opportunity. it has only lookup and external lookup