0

When I create a new task I have a custom field I added to the layout that is a checkbox saying Demo presented. This works fine.

I then need to create a field for Contacts that will check if I have a Task with that same contact where the Demo presented checkbox is checked or not.

As of now, when I create a new field under the Contact object using a Formula with record type Text - using the following formula: IF(Activity__r.Demo_Presented__c <> False, 'Yes','No') - it keeps giving me an error saying -

Error: Field Activity__r does not exist. Check spelling.

Any idea how I can solve this?

Thank you very much!

1
  • 1
    What you want to achieve is not possible via a simple formula fields. In terms of data model, a contact can be linked to many Tasks, so you would have to create an apex trigger for that.
    – Chris
    Mar 9 at 12:34

1 Answer 1

0

Formulas can only access the current record and parent records, not child records. There are several ways you can accomplish this. First, you can write an Apex Trigger. Second, you could use a Record-Triggered Flow on the Task to update the Contact. Third, you could use the Process Builder (not recommended, as it is deprecated). No matter which method you use, you'll have to manually update the contacts the first time to catch any records that should have already been updated (e.g. using the Import Wizard or Data Loader).

You must log in to answer this question.

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