Calling Job Receipt To Inventory from other form

Hi,
I created a button to open “Job Receipt to Inventory”.
Customization is very simple: I created the button and added “click” event to the customization.

private void epiButtonC1_Click(object sender, System.EventArgs args)
{
	// ** Place Event Handling Code Here **
	ProcessCaller.LaunchForm(this.oTrans, "IMGO3001");  // IMGO3001 is a standard menu ID
}

The problem is that when I click this button, Epicor will show the error message first and then opens the “Job receipt to Inventory”.

Error message:

Business Layer Exception
Job Not Found for Job Type MFG
Exception caught in: Epicor.ServiceModel
Error Detail

Description: Job Not Found for Job Type MFG
Program: Erp.Services.BO.ReceiptsFromMfg.dll
Method: GetNewReceiptsFromMfgJobAsm
Line Number: 2591
Column Number: 17
Table: PartTran
Field: JobHead
Server Trace Stack: at Erp.Services.BO.ReceiptsFromMfgSvc.GetNewReceiptsFromMfgJobAsm(String pcJobNum, Int32 piAssemblySeq, String pcTranType, String pcProcessID, ReceiptsFromMfgTableset& ds) in C:_Releases\ERP\UD10.1.600.19\Source\Server\Services\BO\ReceiptsFromMfg\ReceiptsFromMfg.cs:line 2591

I have checked all BPM -s and cannot find any method or data BPM for this object / method or table / field!

I have tested to run the other programs menu ID and then this customization works well. Programs opens correctly, no any error messages.

What I’m doing wrong or how I can avoid this error message?

Try running a trace log. It appears the screen is getting a value it isn’t expecting.

Looks like for some reason, when you call it from a button, it calls the GetNewReceiptsFromMfgJobAsm method, but when you call it from the menu, it does not. Weird.

For some reason the LFO (Launch Form Options) are not coming across as null.

If you change the code to this.

ProcessCaller.LaunchForm(this.oTrans, "IMGO3001",null)

It should fix that.

1 Like

This works well. :slight_smile:
Thanks!