Hello everybody,
From a custom BO, I created a field with type ContactPersonInternalID and I set the DisplayType as ObjectValueSelector with the Public OVS /BYD_COD/SalesOnDemand/Contact/UI/COD_Contact_SOVS.OVS.uicomponent
It works fine, but I get only the ContactPersonID while I would like also display the name.
I had a similar need on Employee and it works fine with this code :
var employee_PlantQM;
employee_PlantQM = Employee.Identification.Retrieve(this.Plant_QM_or_CS_Mgr_code);
if(employee_PlantQM.IsSet()){
this.ToEmployee = employee_PlantQM.ToRoot;
this.Plant_QM_or_CS_Mgr_Employee_name = this.ToEmployee.CurrentCommon.Person.Name.GivenName + " " + this.ToEmployee.CurrentCommon.Person.Name.FamilyName;
}
else
this.Plant_QM_or_CS_Mgr_Employee_name.Clear();
Same for the customer with this code :
var query = Customer.QueryByIdentification; | |||
var selectionParams = query.CreateSelectionParams(); | |||
var resultData; | |||
selectionParams.Add(query.InternalID, "I", "EQ", this.Customer_code); | |||
// Result | |||
resultData = query.Execute(selectionParams); | |||
this.Customer_BusinessPartner_name.Clear(); | |||
foreach(var account in resultData) | |||
{ | |||
| |||
} |
So, do you know if it exists a similar way to get the ContactPerson name ? which object should I use ?
Thank you
Best regards
Olivier