Skip to Content
0
Former Member
Nov 07, 2014 at 05:53 AM

No result on querying the Employee BO on ID returned by the Employee OVS

150 Views

Hi Experts,

I have mapped the OVS component property of an extension field to the Employee OVS, but when I query the Employee BO on the returned ID the result set is empty. Following is the script I have used:

Here "EmployeeResponsible" is an extension element with type ID

import AP.FO.BusinessPartner.Global;

var ERquery = Employee.QueryByIdentification;

var ERresultData = ERquery.ExecuteDataOnly();

var ERselectionParams = ERquery.CreateSelectionParams();

ERselectionParams.Add(ERquery.InternalID, "I", "EQ", this.EmployeeResponsible.RemoveLeadingZeros());

ERresultData = ERquery.ExecuteDataOnly(ERselectionParams);

var ER = Employee.Retrieve(ERresultData.GetFirst().UUID);

this.EmployeeResponsibleDescription = ER.CurrentCommon.BusinessPartnerFormattedName;

Nothing is returned in the ERresultData. Any thoughts on possible reasons for this issue ?

Regards

Shruti