I am trying to get a nested (dependent) custom field option using the data method. I tried the same format as suggested in the documentation.
format: {{customfield}}_options
code:
client.data.get("cf_l1_options").then ( //working
function(data) {
console.log(data);
},
function(error) {
console.error(error);
}
);
client.data.get("cf_l2_options").then ( //throwing error
function(data) {
console.log(data);
},
function(error) {
console.error(error);
}
);
client.data.get("cf_l3_options").then (. //throwing error
function(data) {
console.log(data);
},
function(error) {
console.error(error);
}
);
In the above code, I am trying to get options for level1, level2 and level 3 fields. For level 1 fields it is not throwing any error, the options array is returned as expected. But for level2 and level3 fields I tried the same code using the appropriate field name it is throwing an error.
Error: {message: 'Invalid attribute provided.'}
Field JSON:
I am not sure why it is not working for level 2 and level 3 fields. can someone please help me with this?