You need to sign in to do that
Don't have an account?
Sravanthi Sunkari
change the field value dynamically
I have a custom object 'CO'. On this I have a standard Name field 'COName' of data type Text(80).
Some of the records on this object have the COName values in the number format '0000'.
Some of them have COName values which include some text in it like 'xxx000000'.
I want the field COName values with only numbers in the field value to change to the format 'xxx000000'.
I tried workflow but it fires only either when record is created or pdated. But I want them dynamically change.
I have nearly 600 records for which this change has to be done. these records have been created from past 5 years.
Can any one help me how to do this either by coding in Visual force or apex or any other way.
Once these changes have been done I am planning to change the data type of this field to Autonumber for maintaining the consistancy.
Thanks.
Note: I am new to coding. So a detailed explanation with code shall be appreciated.
Some of the records on this object have the COName values in the number format '0000'.
Some of them have COName values which include some text in it like 'xxx000000'.
I want the field COName values with only numbers in the field value to change to the format 'xxx000000'.
I tried workflow but it fires only either when record is created or pdated. But I want them dynamically change.
I have nearly 600 records for which this change has to be done. these records have been created from past 5 years.
Can any one help me how to do this either by coding in Visual force or apex or any other way.
Once these changes have been done I am planning to change the data type of this field to Autonumber for maintaining the consistancy.
Thanks.
Note: I am new to coding. So a detailed explanation with code shall be appreciated.
if you wants apex code then I think you should create a batch apex do the same like update the record. You can execute that batch class from execute anonymous developer console
All Answers
if you wants apex code then I think you should create a batch apex do the same like update the record. You can execute that batch class from execute anonymous developer console