0

I am tryging to solve for following: Update revalidation Due date (formula field) which on Enrollment object based on risk score field of provider object (contact), risk score field of Org object (account) and transaction type of enrollment object(custom Object).

Logic : If transaction Type is 'X' and risk score of either Provider OR Org is "Y" then date = 'Z'

Here's what I have now for formula of Revalidation Due date:

CASE(TEXT(optm_cld_inr__Transaction_Type__c),
"Reenrollment",
CASE
(
OR(TEXT(optm_cld_inr__Provider__r.optm_cld_inr__Risk_Score__c),
"High", optm_cld_inr__Enrollment_Begin_Date__c  + 1095,
"Medium", optm_cld_inr__Enrollment_Begin_Date__c + 1095,
"Limited" , optm_cld_inr__Enrollment_Begin_Date__c + 1825,
NULL
),

"Initial",
CASE
(
TEXT(optm_cld_inr__Provider__r.optm_cld_inr__Risk_Score__c),
"High",  optm_cld_inr__Enrollment_Begin_Date__c + 1095,
"Medium", optm_cld_inr__Enrollment_Begin_Date__c + 1095,
"Limited" , optm_cld_inr__Enrollment_Begin_Date__c + 1825,
NULL
),

"Revalidation",
CASE
(
TEXT(optm_cld_inr__Provider__r.optm_cld_inr__Risk_Score__c),
"High",   optm_cld_inr__Enrollment_Decision_Date__c  + 1095,
"Medium", optm_cld_inr__Enrollment_Decision_Date__c + 1095,
"Limited" , optm_cld_inr__Enrollment_Decision_Date__c + 1825,
NULL
),

NULL)

Which works well. But I am only checking for PRovider. riskscore here. I also need to check Organization Risk score as well. But I am not sure how will take work with nested CASE formula.

Any help/ guidance will be appreciated. Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.