Hello Team,
I'm trying to write a script to change the description of a field based on another check box field value. But getting some errors in the script. Can someone please check and suggest the solution for this??
def newDNSRequest = getFieldById(getFieldChanged ( ) )
def Host(A Record) = getFieldByName("Host (A Record)")
def Alias(CNAME) = getFieldByName("Alias (CNAME)")
def newDNSRequest = orderRequest.getValue().toString()
if ((getFieldById(fieldChanged).value as "Host (A Record)")?.name) {
getFieldById('Hostname')
.setDescription('No FQDN')
} else {
getFieldById('Hostname')
.setDescription('FQDN Mandatory')
}
if ((getFieldById(fieldChanged).value as "Host (A Record) && Alias (CNAME)")?.name) {
getFieldById('Hostname')
.setDescription('No FQDN')
}
Error in
@ line 2, column 20.