You need to sign in to do that
Don't have an account?
Apex Class help Needed - Urgent
Hi Team,
I am new to developement, i need a script to query error records(Field - description) from an object(Object A) and store in a new object (Object B).
Object A Fields,
Name
Description(This field contains ERROR)
Details
Request Time
Obect B Fields.
B_Name
B_Description
B_Details
B_Request Time
Can anyone help me to fix tis ASAP?
Thanks & Regards
Karthi
I am new to developement, i need a script to query error records(Field - description) from an object(Object A) and store in a new object (Object B).
Object A Fields,
Name
Description(This field contains ERROR)
Details
Request Time
Obect B Fields.
B_Name
B_Description
B_Details
B_Request Time
Can anyone help me to fix tis ASAP?
Thanks & Regards
Karthi
Assuming there are less than 50000 records that you need to query,
ObjectA and ObjectB are the API names of your Objects,
Name ,Description, Details, Request_Time are the APi names of your fields.
Here is the Script you can use.
You need to put the WHERE condition to find the error records.
You can first run the script without the insert statement and check if the records about to be inserted are correct in the debug statement.
If so , you can go ahead with the insertion.
Let me know if this helps.
Regards
Medhya Mahajan
Hi Karthi,I dont know what you you mean by error records.I assume its a field.
Hope this helps.Please let me know if you are looking for something else.
Thanks,
Manohar
You can create a trigger on Object A. On create of new record you can copy the text from Description(This field contains ERROR) to B_Description.
I have done on Account and Contact objects.
Thanks
Aniket