+ Start a Discussion
Money CareMoney Care 

Change Default value

Hi Guys
I have facing a isssue from a long time that i have a percentage field which default value is 10% currently.i need to change that default value 5% from 10% on or later 01/06/2016 created

Thanks in adv
Raghu NaniRaghu Nani
u can chage the default value,Edit that specific field and update it
Money CareMoney Care
@ raghu
no need for manual edit and update ,my query how to update automatically on particular date onwords
Raghu NaniRaghu Nani
may be workflows may solve  u r problem
Parker EdelmannParker Edelmann
Changing the default value doesn't change the value of previous records. Further, a workflow will not be beneficial, because if a user intentionally picks 5% as a value on create, the workflow will change it to 10%. Are you asking how to change a percent fields value from 5% to 10% from a given date onwards?

I've seen only one administative solution to this: Use the Data Loader
Another solution would be to execute this class I threw together:
public class Update_PercentField {
    pulic void ChangePercentValue{
        List<REPLACE WITH sObject API NAME> percents = new List<REPLACE WITH sOject API NAME>();
        for(percent: [SELECT PERCENT_FIELD, DATEFIELD, Id FROM sObject WHERE PERCENT_FIELD= 0.05 AND DATEFIELD > Date.newInstance(2016, 1, 1)]){
        sOject.percentfield = 0.05;
         update percents;
I am not a good coder and it needs some work, but it forms the basis for the idea.

Unfortunately, if you are in a Professional Edition, neither idea will work because both use the API. Let me know if this helps.