cancel
Showing results for 
Search instead for 
Did you mean: 

Query all the employees in the system in ByD

former_member606838
Participant
0 Kudos

Hi experts,

I am trying to query all the employees in the system to pass the data to some custom BO. My query is as follow:

var queryByEmployeeBID = Employee.QueryByIdentification;
var queryByEmployeeBIDParameter = queryByEmployeeBID.CreateSelectionParams();
queryByEmployeeBIDParameter.Add( queryByEmployeeBPD.IdentificationBusinessPartnerID, "I", "GE", "0");
var employeeQueryResult = queryByEmployeeBID.Execute(queryByEmployeeBIDParameter);<br>

is it the correct way? if not can someone give me a better idea?

Thanks,

Mousa

Accepted Solutions (1)

Accepted Solutions (1)

A-J-S
Active Participant

Hi,

If you want all employees, then you can execute the query without any selection.

var queryByEmployeeBID = Employee.QueryByIdentification;

var employeeQueryResult = queryByEmployeeBID.Execute()

Thanks,

Ajith.

VVancalbergh
Contributor

You can even go shorter!

var allEmployees = Employee.QueryByIdentification.Execute();

Answers (0)