You need to sign in to do that
Don't have an account?
JLH
Setting Picklist to null
I want to create a Detail Page Link that set a custom Picklist value of the Contacts to the same custom Picklist value in an account. That code is simple:
records[i].field__c = '{!Account.field__c}';
and setting to null is simple:
records[i].field__c = null;
The problem I am having is writing a function that can do both. I know I need to check the field__c value but I'm not sure how.
Thanks in advance.
May be this could help.
var picklistfieldvalue = '{!Account.Field__c}';
if(picklistfieldvalue == "" )
{
records[i].field__c = null;
}
else
{
records[i].field__c = '{!Account.field__c}';
}