I have been working on some customizations with the Supplier Price List screen, and was wondering if it might be possible to populate the VendPart detail for all parts after the Supplier has been entered. Here’s what I came up with for my best attempt, but it is not loading any data:
My only thoughts…
I might try and do this with BPM Widgets instead of custom code.
While widgets can definitely be a little more tedious, in theory are more compatible with upgrades.
And I might insert a few message-boxes too… verify key values are populated and if things are flowing as expected?
Just in case anyone needs to accomplish something similar, I would like to post the code I used to complete this task. First, I created a button with the following screen customization code:
private void btnGetBPOPart_Click(object sender, EventArgs args)
{
string vno = GetVendorNum();
string bpo = GetBPO();
if(vno == "") throw new Exception("No Vendor ID specified.");
if(bpo == "") throw new Exception("No Blanket PO specified.");
int iVendorNum = Convert.ToInt32(vno);
FetchAllVendorPartsForBPO(vno, bpo);
}
Note that my GetVendorNum and GetBPO methods were just responsible for retrieving the two values I needed to pass along. The FetchAllVendorPartsForBPO method is shown here:
I must confess, I was surprised that this could be accomplished with so little code, but it really worked out well and properly populated all fields for all parts retrieved by the search.
Hi, I know this has been late, but may I know is there anyway to replicate the same thing for pricelstparts similar to yours. However, I am not sure what business objects we need to call to get existing pricelstparts so that it populates on the partnum on pricelstparts. I also wanted to know is there additional bo method or anything else you did for the form to pop up?