If 'SF Connection Case Reference' is not empty then both fields should be mandatory only upon resolution (in resolved and done state).
'SF Connection Case Reference' field type is Remote System Reference. and other 2 fields are a select list.
I want to add Scripted Validator to achieve this. Can you please help us with the code to configure this.
I want to implement this on Resolve transition Workflow validator...
I have tested below Behavior script but it is not working as expected.
-----------------------------------------------------------
def cf = getFieldByName("SF Test Connection Case Reference").getValue()
def cf1 = getFieldByName("Quality of Escalation")
def cf2= getFieldByName("Shortcut opportunity")
log.error("cfremote : " + cf)
log.error("cf : " + cf.getClass())
//def cfValue = cf.getValue()
if (cf != "")
{
cf1.setRequired(true)
cf2.setRequired(true)
}
else {
cf1.setRequired(false)
cf2.setRequired(false)
}
-----------------------------------------------------------
It's not able to validate the 'SF Test Connection Case Reference' (field type - Remote System Reference).
What is in the logs ? (what is class type and contents of cf ?)
What is "...not working as expected..." ?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.