on 07-06-2016 4:44 PM
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
Hi,
Does Someone is able to provide me the correct way to get the contact person information, like the country ?
Thank you
Regards
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Oliver,
Contacts is also a BusinessPartner. You can retrieve the name as shown below
var Contact = BusinessPartner.Retrieve(ContactID); //ContactID is of type BusinessPartnerInternalID
var ContacCurrCommon = Contact.CurrentCommon;
var FormatName = ContacCurrCommon.BusinessPartnerFormattedName;
var FirstName = ContacCurrCommon.Person.Name.GivenName;
...
If you need more information on the BO and Specific fields, you can open the respective UI (ex Contacts TI) from UI designer and check the UI binding to Data model and BO model.
Thanks Pramodh
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.