Skip to main content

I need to create a formula field that updates a checkbox after verifying Company's value. I couldn't complete creating a formula field as it throws an error that the limit is 5000 characters. I want to query many company values and update the checkbox. Can someone please suggest an alternative to achieve this functionality?

 

Can I create a trigger or apex class? 

 

#Sales Cloud #Analytics #Automation #Integration Would creating that be affected by character limits as well?

1 resposta
  1. Ontem 14:07

    Hi SidParnam,

    If you're maintaining a long list of company names in a formula, I wouldn't recommend moving the same large IF/OR logic into Apex. Apex doesn't have the formula field's 5,000-character limit, but hard-coding a large company list makes the solution difficult to maintain.

    A better approach would be to store the company values as configuration:

    • Create a Custom Metadata Type with the company name and the checkbox value.
    • Use a before-save Record-Triggered Flow to look up the company and set the checkbox.
    • If you need more complex processing or a very large dataset, Apex can also query the configuration and update the record.

    This way, adding or removing a company doesn't require changing and redeploying your formula/Apex code. 

     

    If you share approximately how many company values you have and whether the checkbox needs to update immediately when the Company field changes, we can suggest the simplest implementation. 

0/9000