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

Prevent new task if parent record flagged as approved

hi - I have a custom object with a checkbox approved__c.  If this checkbox is true I would like a validation rule that would prevent a new task being created on it. Any ideas?


thanks in advance!

I've tried this but I get a suntax error that a 'Record name' is expected

vlookup( $ObjectType.Term__c.Fields.Approved__c , $ObjectType.Term__c.Fields.Id ,WhatID )=true

I don't think a validation rule will work here. You would probably need to create a trigger if you want no Tasks to be created if the checkbox is Checked.


Hope this helps!

Using trigger you can definitely do this, but try this first if it works:

vlookup( $ObjectType.Term__c.Fields.Approved__c , $ ,What.Name)=true

as The field_on_lookup_object must be the Record Name field on a custom object.