Back to all

How does a Yes/No UDF work through the UI and API?

(edited)

I made a UDF for my Lead object, "Email_Consent" and it's a Yes/No field. It is showing like the displayed picture. Is it not supposed to look like a toggle?

Also, what is the proper values to be sent through the API for a Yes/No field? The value "Yes" and "No" does not seem to work.

Thanks,

Andy

EDIT: also checked FieldOption and it doesn't seem to be returning anything (I've tried with both the NAME and TYPEID)

payload sent to API to create the UDF:


{    
    "Schema": {
        "Data": {
            "Key": None,
            "Type": "EnumField<StringItem>", # EnumField example
            "Name": "Date_of_Email_Consent",
            "AppliesTo": [
                "Lead"
            ],
            "Inactive": False,
            "Attributes": {
                "MultiSelect": False,
                "YesNo": True
            }
        }
    },
    "Compatibility": {
        "SchemaObject": "1.0",
        "LeadObject": "1.3"
    }
}

}