Hi
We have requirement to insert the record in the Multiple Production Clock Entry screen from the other custom action. When i try to create the clock entry we are getting the below issue.
Here is the code i tried to insert the record, could you please help me.
public PXAction<POClockINFilter> ClockIN;
PXUIField(DisplayName = "Clock IN", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
PXButton(CommitChanges = true)]
public virtual IEnumerable clockIN(PXAdapter adapter)
{
MultipleProductionClockEntry ProdClockEntrtyGraph = PXGraph.CreateInstance<MultipleProductionClockEntry>();
AMClockItem aMClockItem = (AMClockItem)ProdClockEntrtyGraph.Document.Cache.Insert();
aMClockItem.EmployeeID = 2892;
AMClockTran newTran = (AMClockTran)ProdClockEntrtyGraph.Transactions.Cache.Insert();
newTran.ProdOrdID = "AM000048";
newTran.OperationID = 2;
ProdClockEntrtyGraph.Transactions.Cache.Update(newTran);
ProdClockEntrtyGraph.Save.Press();
return adapter.Get();
}