0

Good morning,
Relatively new to Salesforce, so learning as I go at the moment.
We have an issue where the text from one (long text) field is being duplicated on another long text field in some records on a custom object.
I would like to be able to see records where the content in long text field A matches the content in long text field B. Formulas won't work, I believe, as I was hoping to create a custom field where when fielda__c = fieldb__c it's true or 1,and then create a report from that.
My second thought was perhaps to lift the first x characters from each field and match those somehow?
I'm hoping it's my newness to Salesforce that means I'm missing something obvious in being able to compare two text fields.
Any assistance is appreciated.

1
  • Welcome to Salesforce Stack Exchange (SFSE) [and to Salesforce]! Be sure to take the SFSE Tour. Please edit your question to add the following info: Is this something that you are wanting to do continuously or on a regular basis, or more of a "one off" to help you determine how to fix the issue? You mentioned a Formula. Are you able/allowed to do this with Apex or something other than a Formula (in other words, are you limited to which way this is approached)?
    – Moonpie
    Commented Oct 27, 2021 at 12:04

1 Answer 1

0

At the moment, isn't possible use long field in salesforce formula, so you need to do some workarounds to achieve your goal. Here some suggestions:

In Salesforce side you can create a boolean field and compare in the Apex the two long fields and valorize the boolean field or no, in this way you can filter by report in salesforce. (maybe you need to schedule this execution)

Other way is export the records (Dataloader, Salesforce Inspector, etc) with the Id column, and the two fields, compare them in excel, and do a mass update on the records that are equals. (manual process and necessary do each time that you need to compare them)

batch reference and examples: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm

schedule apex reference: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm

1
  • Thank you Willian, that's great, I will read through these links now. Thanks! Commented Oct 27, 2021 at 13:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .