BPM when using Price List Inquiry

(Karen) #1

I need a little help…

(I’m working in E10.1.400.20)

I have a BPM that pops a message when entering Parts on Orders. This BPM is looking at a User Defined field in the Part table and checking to see if that field is true. If the condition is True the BPM Executes Custom Code (I had help writing that code).

I want to have the same BPM run when a part is entered in Price List Inquiry (regardless of the customer).

I struggle with finding the proper Method to work with. The Trace Log makes little sense to me.

I need help identifying which BO and Method to work with and with modifying the Custom Code to work in the new BPM. I know I need to change “SalesOrder” and “ChangePartNumMaster”. I think I need to change “rPart => rPart.PartNum == partNum” to “rPart => rPart.PartNum == cPartNum”, but that may depend on which Method is the correct one to be working on.

var sMinOrdQty = “”;

var sBO = “SalesOrder”;
var sMethod = “ChangePartNumMaster”;
var messageText = “”;

//var pPartNum = partNum;

// Returns first row or null
var xPart = Db.Part.Where(
rPart => rPart.PartNum == partNum
&& rPart.Company == “LCPC”).FirstOrDefault();

if (xPart != null)
if (xPart.MinOrderQty_c)
sMinOrdQty = xPart.MinOrdQtyCom_c;

	messageText = "This Part has a minimum order qty of " + sMinOrdQty;       
			sBO, sMethod);


I pretty sure the BO should be PriceListInquiry, but which Method?

(Karen) #2

I took another stab at this…

I found the correct Method. It’s GetPartXRefInfo.

I was able to get the BPM working.

Thanks for looking