You need to sign in to do that
Don't have an account?
sfdc_syed
Read the following Scenario
Hi,
I have scenario like there are two custom objects i.e.salary and BankAccount.
In salary object i have 2 custom fileds i.e number data type and In bankAccount object there is a custom filed called total_c
when i am giving 20 and 30 in salaryobject then automatically updated in to bankaccount object i.e the result would be shown in total_c =50 .So how can i do that let me know asap.
Thanks
Two basic ways to accomplish this:
1) Use a standard Rollup Summary field to sum up the value of Bank_Account__c.Total__c. This renders the field read-only and is automatically maintained by the system. Use this method if Salary__c.Bank_Account__c is a master-detail relationship field.
2) Use an Apex Trigger to calculate the value of Bank_Account__c.Total__c whenever a Salary__c record is created, modified, deleted, or undeleted. Use this method if Salary__c.Bank_Account__c is a lookup (detail) relationship field.
The exact method will depend on the design requirements of your application.