Hi all
this is my approach to events and javascript on D365s fields.
I want set the default value of this lookup field.
this is my library/javascript (cr07a_ATHsetLookupFieldUtentiCollegatiOpportunity)
//-------------------------------------------------------------------------------------------
// setTextField
//-------------------------------------------------------------------------------------------function setTextField(e){
// Get the Form Context
var formContext = e.getFormContext();// Set the 'User Scope'[dev1_idcollegamentocr07a_athambuteopportunity] to a variable
var ValDefault = "Customer Relationship Management"; <-- (here I try also with IDvalue [078d7702-2581-ec11-8d21-0022489ea185])
formContext.getAttribute("dev1_idcollegamentocr07a_athambuteopportunity").setValue(ValDefault);}
but the default "Customer Relationship Management" is not show on field.
Where I'm mistaken?
thanks for any reply and suggestion