• afgms
  • NEWBIE
  • 10 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello Friends. I hope you're well.
I'm new in Apex so I would like to have your input regarding how to handle this requirement that I have to complete.

A new CustomObject that will be created in order to be filled with records that represents update instructions that needs to be performed. The Custom Object will have the following fields: SObject (were the update is to be performed), the SObjectID (ID of the record), Field (Name of the field in the SObject) and Value (Value to be applied in the update).

So, if the user adds the following record in the Custom Object:
sObject - Account
SObjectID - 221hdi21u213
Field - Name
Value - David

The process when is executed (it will be scheduled), the record is fetched and a update will performed in Account (to change the value for the field Name, for the record ID 221hdi21u213)

In this case, I know that I need a Scheduler Apex class and Batchable class. Since the aim is to be flexible and be able to add multiple records (and multiple objects), what should be the best approach to handle this?

Thanks a lot!

 
  • March 09, 2023
  • Like
  • 0
Hello Friends. I hope you're well.
I'm new in Apex so I would like to have your input regarding how to handle this requirement that I have to complete.

A new CustomObject that will be created in order to be filled with records that represents update instructions that needs to be performed. The Custom Object will have the following fields: SObject (were the update is to be performed), the SObjectID (ID of the record), Field (Name of the field in the SObject) and Value (Value to be applied in the update).

So, if the user adds the following record in the Custom Object:
sObject - Account
SObjectID - 221hdi21u213
Field - Name
Value - David

The process when is executed (it will be scheduled), the record is fetched and a update will performed in Account (to change the value for the field Name, for the record ID 221hdi21u213)

In this case, I know that I need a Scheduler Apex class and Batchable class. Since the aim is to be flexible and be able to add multiple records (and multiple objects), what should be the best approach to handle this?

Thanks a lot!

 
  • March 09, 2023
  • Like
  • 0