function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kunal Purohit 4Kunal Purohit 4 

How to update the field value using configuration?

Hi,
I am having an Object named ProspectUSer__c. I  want to update the timezone__c field based on AreaCode__c, StateCode__c and ZipCOde__c values at time of insert/update. But again the values of these three fields need to be get from custom metadata.? How to perform this fucntionality using configuration. Please suggest.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi kunal,

Do you mean that you have timezone value in custom settings and you want to update the value on custom object based on areacode,statecode and zipcode in custom metadata setting?

Thanks,
 
Hitesh chaudhariHitesh chaudhari
You can achieve this using Flow and Custom Metadata
  • Create Metadata with names like 'Country Timezones'
    • Record Will be like this: 
      • Country Name : India
      • Timezone Value: (GMT+05:30) India Standard Time (Asia/Kolkata)
  • Create a record-triggered flow on ProspectUSer__c to check zipthe  code anhaveountry has been filled.
    • In Flow query meta data using country name
    • and assign time zone 
    • Update the record in the same flow 
    •