RE: Multi Select Option Sets array to string
If you notice in the function getValuesMultiPicklist you should have 2 parameters, field and formContext. just change "new_temasdeactividadmpl" by word -> field
function doSomething(executionContext){
var formContext = executionContext.getFormContext();
//Your logic...
var values = getValuesMultiPicklist("new_temasdeactividadmpl",formContext);
var myTextField = formContext.getAttribute("new_inlinetxt");
if(myTextField!==null&&values!=="")
myTextField.setValue(values);
}
//@parameter in formContext = Xrm context, Xrm.Page
//@parameter in field = name field, string
//@values out string
function getValuesMultiPicklist(field,formContext = Xrm.Page){
var values = "";
var multiOptions= formContext.getAttribute(field);
if(multiOptions!==null)
values = multiOptions.getText()?multiOptions.getText().join(","):"";
return values;
}
and remember to pass the execution context... mark the checkbox at the time you are registering the function in the form "pass execution context as first parameter"
note: the new_inlinetxt field must have a considerable maximum length of characters e.g. 100.
regards.
please consider marking as an answer if it was helpful