-
Salesforce batch class to update unrealed object field with rollup summary field.
Need help to develop logic for batch class for below scenario.
I have one custom object Invoice and another object Invoice details which have master detail relation with Invoice. In Invoice there is one Rollup summary field Total Value with amount field of the Invoice Details. In Invoice object there is another field blanket number. Note : One blanket number against the multiple Invoices. i,e blanket number 123 --- invoice 1 blanket number 123 --- invoice 2 blanket number 123 --- invoice 3
Have another custom object Invoice details and there in one text field blanket number which can be filled manually by sales person and another field Total amount which would be populated by trigger. i,e if sales person enter blanket number 123 then total amount would be addition of invoice 1, invoice 2 and invoice 3 total value(addition of rollup summary field) above logic should be implemented by trigger and working fine.
Now the requirement is if new invoice with invoice item will come(by interface) with the same blanket number then Total amount field of Invoice details should be updated with addition of new rollup summary field value (old value + new rollup summary field value). i,e if old value id 1000 and new invoice rollup summary field value is 500 then Total amount field of Invoice details should be 1500.
Hope this requirement is clear. I appreciate any help to write batch class for these.
Thank you in advance.
Log In to reply.
Popular Salesforce Blogs
A Small Guide On Salesforce Integration: Benefits | Types | Perks
As businesses expand their operations, they often need help to keep up with the increasing workload. From managing customer information to tracking sales leads, the…
How Does A Salesforce Consultant Shape Effective Business Strategy?
Salesforce has become one of the most popular business software in recent times. Using the same, several businesses have been effectively able to manage their…
Best Practices For Defining Business Processes In Salesforce
The meaning of the term business process and the advancement of this definition since its origination by Adam Smith in 1776 has prompted such territories…
Popular Salesforce Videos
Install Adobe Sign & Send Agreements For E-sign in Salesforce
Learn the steps involved in installing Adobe Sign and sending agreements for e-sign in Salesforce. This tutorial will cover the following points - 1. Install…
Salesforce is planning a blockchain product?
Salesforce is planning a blockchain product. That news alone would usually coincide with positive market moves, but in a diluted crypto market that isnt the…
Pardot Segmentation Lists | Pardot Tutorial | Salesforce Lightning Tutorial
Pardot Segmentation Lists. This video will cover the following points - 1. Types of Segmentation Lists (0:16) Take a look at the different types of…
Popular Salesforce Infographics
CRM BENEFITS FOR SMALL BUSINESS
As small businesses become more established, business owners should start considering customer relationship management (CRM) systems that are both affordable and effective. In this infographic,…
Key Benefits Of Using Salesforce CPQ
Improves productivity and efficiency with Salesforce CPQ. Automate contract amendments, usage pricing, and renewals using an innovative billing feature of Salesforce CPQ Still have a…
Enhance Customer Experience With Salesforce
Salesforce Makes Personalized, Consistent Digital Customer Experience a Reality. Salesforce, widely recognized as the leader in business CRM, gives organizations the tools they need to…