You need to sign in to do that
Don't have an account?
F Smoak
Validation Rule on Saving a Call for particular address combination
I have a validation rule to write on a call object which has a related object Address. The address object has 2 picklist fields--- Address Type, State
The objective is if if state!=PR AND Address Type=POB do not allow to save the call for that address combination BUT if state=PR AND address type=POB allow to save the call for that address combination.
Would be really helpful if anyone could help! Tried innumerable ways but all failing!
Thanks in Advance!
The objective is if if state!=PR AND Address Type=POB do not allow to save the call for that address combination BUT if state=PR AND address type=POB allow to save the call for that address combination.
Would be really helpful if anyone could help! Tried innumerable ways but all failing!
Thanks in Advance!
AND( NOT( ISPICKVAL(Address__r.State__c, 'PR') ), ISPICKVAL(Address__r.Address_Type__c, 'POB') ) ---> check for the exact API name. You can navigate from Call > Address > those 2 fields.
Also this will work if there is a lookup to Address in Call object.
All Answers
I think your validation rule will look like this:
AND( NOT( ISPICKVAL(State__c, 'PR') ), ISPICKVAL(Address_Type__c, 'POB') )
Let me know if this works.
--
Abhilash
AND(
ISPICKVAL( $ObjectType.Address_vod__c.Fields.Address_Type__c , 'POB' ),
NOT( ISPICKVAL( $ObjectType.Address_vod__c.Fields.State_vod__c , 'PR') )
)
But I am getting syntax error Error: Incorrect parameter type for function 'ISPICKVAL()'. Expected Picklist, received Object
I guess this ISPICKVAL would not support on object type.
Address information is displayed on call object as a Long Text area type field. Address Type and State cannot be fetched from there I believe. So I am navigating from Call-->Address-->fields.
AND( NOT( ISPICKVAL(Address__r.State__c, 'PR') ), ISPICKVAL(Address__r.Address_Type__c, 'POB') ) ---> check for the exact API name. You can navigate from Call > Address > those 2 fields.
Also this will work if there is a lookup to Address in Call object.
Is there any alternative way to resolve ithis?
Appreciate your help!
Not aware much about the interface in the forum so I replied over comments,but I have marked it now.
Thanks
FSmoak