In the kinetic ‘Purchase Order Entry’ screen I have created a field (Text box) in the Line > Details page for a drawing number. I have it ep-binded to the field in the dataview that I have created that pulls data from the PartRev table which has the Drawing number. (see image below)
I have created a event which first clears the dataview, then runs a rest-erp through Erp.BO.PartSvc (GetByID) that passes through the part number for ‘PODetail.PartNum’ and returns the data into the dataview. I also noticed theres different events that the PODetail.PartNum changes like ‘RowChanging_PODetail’, ‘OnClick_grdPODetail’, ‘ColumnChanging_PODetail_PartNum’ and a few more.
My problem is for tying it to the ‘OnClick_grdPODetail’ and the ‘ColumnChanging_PartNum’ event it works fine, clearing the dataview, then the rest-erp populates it based on the part number saved to PODetail.PartNum. But the event ‘OnClick_grdPODetail’ only runs when you first click the the line through the POHeader screen, and the ‘ColumnChanging_PartNum’ event only runs when you change the text box value manually. I need it to work the same when you change the part number by switching lines from the arrows above (Event: ‘ColumnChanging_PODetail_PartNum’). The events are setup the same but for some reason it’s acting like the data isn’t clearing properly or else its grabbing the ‘PODetail.PartNum’ before it changes in PODetail so it grabs the information from the previously selected PartNum (See imagess below)
I’ve also added a field called ‘View Part Number’ under ‘Drawing Number’ for reference that pulls the part number from the ‘DT_PartRev’ dataview. The 'Drawing number is always be the right one for the ‘View Part Number’ (because they are pulling from the same dataview) but I’m trying to get the View Part Number to match the PODetail.PartNum (basically I need the View part number to update upon changing the ‘PODetail.PartNum’). If I can get those 2 to match then the drawing number will also be correct.
(I had to tie the same event to 3 different triggers which means there were 3 different events)
Trigger First trigger
Second trigger
Third trigger
Clear the data view (for some reason I couldn’t get it to refresh without clearing the data view)
Check if part exists (using the Part.PartExists rest-erp service passing PartNumber from PODetail.PartNum) (this value is automatically stored inside a variable called actionresult.returnObj)
If the output was true, then I would run the Part.GetByID service (step 5)
Run the rest-erp for Part.GetByID and push the results to the dataview (also you have to create this through the condition or it doesn’t work, meaning you click the “true” box on the parameter and add the rest-erp through there.
Sorry for the long post, trying to explain in as much detail as possible because I wish I had these details when creating it the first time.
Also, there might be a faster or more efficient way to do this. I couldn’t find a single event that triggered for every time I wanted it to update so I used three.
Also, for the RowChanged_SysPages event trigger, it likes to not fill in the PODetail data view yet so when I created that event it just has an extra condition that checks to make sure the PartNum is not “undefined” which is Epicor’s way of saying null. Then the event is created through the “false” option and its the same from there.