Hi Team,
I am using this to set the metadata field value.
//set element with the an object:
fd.field('TaxonomySingle').value = {
id: "ac68fff3-2826-48f1-8d24-3fadad9533f0",
name: "Test1"
};
but it gives an error in console.
spform.js:65 TypeError: Cannot set properties of undefined (setting 'value')
at a.eval (eval at e._executeCustomJavaScript (spform.js:116:105460), :54:51)
Thanks in advance
Navpreet
Dear @navpreet.kaur,
Are you sure that the Name of the field is correct? Also, is it wrapped inside appropriate events, like this:
fd.spRendered(function(){
fd.field('TaxonomySingle').ready().then(function(field) {
field.value = {
id: "ac68fff3-2826-48f1-8d24-3fadad9533f0",
name: "Test1"
};
});
});
I tried this and it's not working too. the name of the field is right .
Dear @navpreet.kaur,
Are you getting the same error in browser's console? Can you send a screenshot of browser's console and of the field's name?