-
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 Complete Guide to Integrating Salesforce with ERP Systems
In today’s interconnected business environment, integrating Salesforce with your Enterprise Resource Planning (ERP) system can provide significant operational efficiencies and strategic advantages. By bridging these…
Why Work With a Salesforce Partner? Here are All the Reasons
A lot of companies are looking to implement Salesforce as a valuable tool to help them automate processes, strengthen customer relationships, and more. Implementing Salesforce…
Salesforce Summer ‘19 – The Top 10 Features
Three times per year, Salesforce provides us with a host of new features across all the cloud products. Coming up soon is the Summer 19…
Popular Salesforce Videos
Salesforce Anywhere – Release Readiness LIVE, Spring '21
Salesforce, the global leader in CRM, introduced Salesforce Anywhere – bringing together powerful new technologies and platform services to help organizations unlock new levels of…
Coronavirus Impact On Healthcare Sector – Time To Rejuvenate | Salesforce CRM
The Covid 19 has created an economic recession in the healthcare industry with disruption in healthcare services. The global healthcare CRM market is likely to…
What is the Difference Between Object and Database in Salesforce?
Salesforce Object: Salesforce Object are database table which give permission to store data that is specific to organization. Salesforce Database: The organized collection of object…
Popular Salesforce Infographics
Salesforce App Development, Listing and Expert Services | Concretio
Boost your business efficiency, provide better customer experience, streamline I.T. expenditures by eliminating the need of complex integrations and coding. Concretio is a Salesforce Consulting…
All the Ways Salesforce Portal for Education Can Help Logistically
The education industry is layered and has multiple logistical elements in its workflow. How would we do it if we were to improve it? The…
Amplify Your Support Operations with Email to Case Advance | Salesforce
Managing cases efficiently in Salesforce is pretty easy. And given the rising expectations of customers, being fast to answer their queries via Salesforce-powered communities is…