-
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
Salesforce Consultant: The Complete 2026 Guide to Hiring, Costs & Implementation Success for USA Businesses
The Problem Nobody Talks About (But Every Sales Manager Experiences) It's Monday at 9 AM. Your VP of Sales opens Salesforce and realizes the forecast…
Salesforce Predictions 2020: What does the Future Hold for Salesforce?
Salesforce, the market leader in CRM, has created a storm in the world of sales and marketing of products and services catering to a diverse…
Top 3 Salesforce Products to Transform Your Customer Engagement into a Value—Added Experience
From a customer perspective, it’s always a priority for businesses to deliver valuable service to them at a favourable price. Still, it’s also essential to…
Popular Salesforce Videos
Secrets and Tips on Marketing Automation in Marketing Cloud | Marketing Cloud Webinar by Vimera
Hi there! Welcome to the recording of our Marketing Cloud Webinar from September 30, 2024! At Vimera (vimera.io), we’re proud to be a trusted Certified…
Salesforce Apex Tutorial for beginners | Apex Salesforce Tutorial
Apex is a proprietary language developed by Salesforce.com. It is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the…
Algoworks Is Now A Salesforce Summit (Platinum) Partner | Salesforce Consulting Services
It's been just a year since we became Salesforce gold consulting partners. Algoworks has now been recognized as a Salesforce Summit Partner (also known as…
Popular Salesforce Infographics
The Best Salesforce Certifications to Look for in 2020
Salesforce tops the charts across the world in Customer Relationship Management. It is not one of the best, but the best in the game. It is…
How To Crack Salesforce Admin Exams with Ease?
The demand for Salesforce Admin professionals is increasing day by day. industries are constantly looking for certified Salesforce Admins. Clearing Salesforce Admin Certification Exams is…
Unlock Agile and Efficient Salesforce Testing With AI-Driven Tools
Like every industry, the world of software testing and quality assurance has also gone under massive development with the emergence of AI technology. Developers and…