Mass updating records:
In this case i have just used a single character "g " to search the Account object and it resulted in 2 records that start with letter "g". if we can think that there can be hundreds or thousands of records resulting in search, we can add up another input field to refine our search. More over we can add pagination to it also.
We can observe one other thing after the search i have given the functionality of multiple selection or checkboxes and check All check box, this will help user a lot in real time.
Hope fully this will help people who are searching for the solution of Mass Updating records.
***With the size limitation of the post am not able to provide code on this post. But if you need a sample code or any approach feel free to drop me an email.
Happy Coding.
Well the first thing that strikes everyone is to use "Data-Loader". Now if there is a need that we have to give this functionality to the end user and they are not comfortable to use Data-Loader. They wanted more out of the platform,like the ability to search for the desired records and update them at once.
Business use case can be any thing like below :- Updating the cases with a particular status or
- Updating the selected Accounts fields or
- Updating the lead source created today by any particular user or
- updating the records that might have same Name or any thing like this which involve manual searching and updating the selected records.
We can make this possible using Visualforce pages and its controllers with wrapper methods.
In order to show this more detail, I have created a custom Tab for the visualforce page and called it as Account MassUpdate as shown below:
On clicking the tab,It will be redirected to our visualforce page. Now you can see that there is a search button. Put any character or word to search for all
the accounts starting with that value.
the accounts starting with that value.
Now once we have selected the records that needs to be updated and click on Update selected Accounts,
it will show up another section where you can actually update your records. In this case i have used only few fields to while updating. we can change it to meet any business need.
Once the new values are entered click on Update Accounts button, This will do the stuff for You. I will update the Accounts the new values mentioned. we can cross check this by going back to the Account records.
***With the size limitation of the post am not able to provide code on this post. But if you need a sample code or any approach feel free to drop me an email.
Happy Coding.
hi. i am new to salesforce i am learning apex and vf so help with some matrial
ReplyDeletecan u send the coding for this to janibashasfdc@gmail.com
thank u
Hi can u pls send me the code to this functionality.i need it very badly..my emailid is vaibhav999.parashar@gmail.com
ReplyDelete