You need to sign in to do that
Don't have an account?
Begginer
guidance on trigger code
Hi all,
I'm learning triggers in salesforce and want some advice on understanding how to write a trigger for below scenario. what is the approach?
There are two objects ObjectPar__c(Parent) and ObjectCh__c(child) having look-up relationship.
Summary:
ObjectPar__c has record types namely "A" and "B".
ObjectPar__c has a field (currency) --> Myamount__c
ObjectPar__c has 2 picklislts --> Picklist_a__c and Pciklist_b__c
ObjectCh__c has a field(curreny_ --> amount__c)
Scenario:
when amount__c(on ObjectCh__c(childobject)) is blank or null, and if record type is either A||B and Picklst_a__c and picklist__b (on parent) is selected then Myamount__c should be required it cannot be blank
I'm learning triggers in salesforce and want some advice on understanding how to write a trigger for below scenario. what is the approach?
There are two objects ObjectPar__c(Parent) and ObjectCh__c(child) having look-up relationship.
Summary:
ObjectPar__c has record types namely "A" and "B".
ObjectPar__c has a field (currency) --> Myamount__c
ObjectPar__c has 2 picklislts --> Picklist_a__c and Pciklist_b__c
ObjectCh__c has a field(curreny_ --> amount__c)
Scenario:
when amount__c(on ObjectCh__c(childobject)) is blank or null, and if record type is either A||B and Picklst_a__c and picklist__b (on parent) is selected then Myamount__c should be required it cannot be blank
You can simply use a validation rule on ObjectCh__c