In PO Entry Form Load event we have written the below code
POAdapter objPO = new POAdapter(oTrans);
objPO.BOConnect();
if (POEntryForm.LaunchFormOptions != null)
{
if (POEntryForm.LaunchFormOptions.ValueIn != null)
{
string PONum = Convert.ToString(POEntryForm.LaunchFormOptions.ValueIn);
if (objPO.GetByID(PONum) == true)
{
SearchOptions searchOpts = new SearchOptions(SearchMode.AutoSearch);
bool blnMorePages = true;
searchOpts.DataSetMode = DataSetMode.RowsDataSet;
searchOpts.PreLoadSearchFilter = "PONum = " + PONum;
oTrans.InvokeSearch(searchOpts);
objPO.GetRows(searchOpts, out blnMorePages);
searchOpts = null;
}
}
}
Now the problem is that, We have multiple PO’s pending for approval. like 50160, 50161… so on.
Approver clicked on custom “View PO” button to see the PO(50160) and PO form will open with data 50160 working fine
But when the approver second time clicked on “View PO” button to view next PO Order 50161 then PO Entry form is not loading with data of 50161 untill and unless we do not close the PO form.
Can you please let me know, how to replace the value in PO Entry form without closing the form?
Your code on the PO Entry Form to load the PO Details is written under Load event, this event only triggers while the form is being loaded first time,
You need to move this code in EpiViewNotification Event or something else.
Have you try oTrans.Refresh (just in case). Do you still see old values? If you click on the dropdown besides the binocular, do you see your added PO? If that’s the case, activate the the new row via code.
You could clear your dataset prior invoking the Invoke on oTrans if nothing works.
Yes, I have tried oTrans.Refresh but same result. I have clicked on the dropdown beside the binocular only one order is displaying refer to below screen