You need to sign in to do that
Don't have an account?
Mass update using fieldsets
I want to write a batch to take all the values in a given fieldset, and overwrite them with another fieldset.
In our account object, we have added many fields: several fields for each month of the current, next, and previous year.
Examples: JAN_CURYEAR_Volume__c, FEB_CURYEAR_Volume__c, MAR_PREVYEAR_Revenue__c etc.
Fieldsets are used to group by year. Examples: CURYEAR_Revenue, PREVYEAR_Revenue, CURYEAR_Volume etc.
A given index will point to the same month in any fieldset.
So I'd like to be able to overwrite PREVYEAR_Volume with CURYEAR_Volume, and so on.
But I'm not sure how to write the iterator, or if I should use an iterator at all!
What's the best way?
Thanks board members!
DS
If You have any say in it, perhaps you can name your fields in a sane way such that you can parse the field label and map it back and forth.