Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3363

C4C/SDK - How get the contact person information

$
0
0

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)
{
this.Customer_BusinessPartner_name = account.CurrentCommon.BusinessPartnerFormattedName;
}

 

 

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


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>