Hi, I am trying to use set options on a custom field as per the documentation here:
These are the options that I have in the custom field called Product (it’s of type: nested_field).
To goal is to only have “Onboarding” as an option in the dropdown.
This is the code:
client.interface
.trigger("setOptions", {
id: "cf_product",
value: ["Onboarding"],
})
.then(function (data) {
// data - success message
console.log(data);
})
.catch(function (error) {
// error - error object
console.log(error);
});
this is the error that is getting logged:
What. might be the issue here?
2 Likes
Hi Rahul Tiwari,
Even we are facing the same issue and exploring the way to fix it.
If you have fixed the issue, It would be helpful, if you share your solution here.
Thanks,
Suman C
S.Ram.K
(Ramanidharan Sathyamoorthy)
3
Hi Rahul,
Please try this code below,
client.interface.trigger(“setOptions”, { id: [‘cf_product’], value:[
{
“Onboarding”: null
}]});
Regard,
Ramanidharan S
1 Like
Hi Ramanidharan,
Thank you for your response. After trying your code, I came to know that we need to use “{}” instead of “null” in your code, to get the proper result.
client.interface.trigger(“setOptions”, { id: [‘cf_product’], value:[
{
“Onboarding”: {}
}]});
Thanks,
Suman.
1 Like
system
(system)
Closed
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.