Hi,
I am working on customization where I have to pick the data from one form to another form on some certain condition using a batch job. The problem is that I have a customized table XYOvertimeRequest in which I have a RefRecId field with the name "HCMWorker" (i.e; XYOvertimeRequest.HCMWorker) and this field is returning the name of an employee using RefGroupField. How I can use this RefRecId field to get the name of an employee in my method ProcessData() of a batch job. Here is my code,
private void ProcessData()
{
XYOvertimeRequest overtimeRequest;
XYOvertimeRequestLines overtimeRequestLines;
ABC_BulkPayment bulkPayment;
ttsBegin;
select * from overtimeRequest
where overtimeRequest.WorkflowState == TradeWorkflowState::Completed
&& overtimeRequest.ABC_PaymentStatus == ABC_PaymentStatus::NotPicked;
if(overtimeRequest.RequestID == overtimeRequestLines.RequestID)
{
bulkPayment.OvertimeRequestID = overtimeRequest.RequestID;
bulkPayment.RequestDate = overtimeRequest.RequestDate;
bulkPayment.Employee = (overtimeRequest.HcmWorker); //Here I am finding the operand type error too, also Employee has type string.
bulkPayment.Department = overtimeRequest.Department;
bulkPayment.Grade = overtimeRequest.Grade;
bulkPayment.PlanOvertimeRequestID = overtimeRequest.PlanOvertimeRequestId;
bulkPayment.TotalHours = overtimeRequest.OTHours();
bulkPayment.TotalAmount = overtimeRequest.OTAmounts();
bulkPayment.insert();
}
ttsCommit;
}
So is there is any way to get the employee name using this RefRecId, Thanks.