Hi Hanu,
you could use e.g. query Project.QueryByResponsibleEmployeeAndOrganisationalCentres with query parameter ProjectID.
Example coding would look like this (of couse you would have to replace the hard coded project id and further adapt it to your needs...):
import ABSL;
import AP.ProjectManagement.Global;
var query;
var selParams;
var queryResult;
var CompanyColl;
query = Project.QueryByResponsibleEmployeeAndOrganisationalCentres;
selParams = query.CreateSelectionParams();
selParams.Add(query.ProjectID.content, "I","EQ", "MC-OH2411");
queryResult = query.Execute(selParams);
foreach (varProjectinqueryResult)
{
CompanyColl = Project.ResponsibleCostCentre.OrganisationalCentreAssignment.OrganisationalCentreCompany;
this.MyID = CompanyColl.GetFirst().ID;
break; // Take first project only
}
Best regards,
Kornelia