How to Update Job Operations from Customer Shipment Entry in Epicor ERP

Using customizations in Epicor you can update a completely different object from the screen you are currently working on.

For example, when I set a Customer Shipment Entry as “Shipped” by checking the “ReadyToInvoice” checkbox, I was then able to set the “OpComplete” field as true for the Job Operations that were tied to the shipment.


Step 1.

First, I went to the Customer Shipment Entry screen and created a customization.

Assuming you are familiar with creating a customization, click on the “Script Editor” tab in your customization.

In order to access the Job Operation object, you can use the JobEntryAdapter by adding the appropriate assemblies first. In the menu bar of the customization screen, select “Tools” and then “Assembly Reference Manager” to open a new window. In the lower, right-hand corner of the window, click on the “Add Custom Reference” button.

Step 2.

Select the following DLL files and click on the “Open” button.

  • Epicor.Mfg.AD.JobEntry
  • Epicor.Mfg.BO.JobEntry

Step 3.

You will now see your newly added assemblies under the “Custom Assemblies” folder.

After you have closed the window, be sure to add the following using statement to the top of your code:

using Epicor.Mfg.Lib;

On the “Form Event Wizard”, set the “Select Event Type” to “AfterFieldChange” for table “ShipHead” and field “ReadyToInvoice.” This way, the following code will fire when the checkbox is set to “true.”

private void ShipHead_AfterFieldChange(object sender, DataColumnChangeEventArgs args)

{

switch (args.Column.ColumnName)

{

case “ReadyToInvoice”:

if (args.Row[“ReadyToInvoice”].ToString() == “True”)

{

// Take action here!

}

break;

}

}

Step 4.

Now you can use the JobEntryAdapter to call the “GetData” method to retrieve all the job operations that match the Job you want to update.

JobEntryAdapter adapter = new JobEntryAdapter(oTrans);

adapter.BOConnect();

string jobNumber = “123”;

System.Data.DataSet dataset = adapter.GetData(jobNum);

Step 5.

Loop through the dataset and make sure you can access table “JobOper.”

Then for each row, set the “OpComplete” field as true, and call the update method.

if (dataset != null)

{

if (dataset.Tables[“JobOper”] != null &;&; dataset.Tables[“JobOper”].Rows.Count > 0)

{

DataTable dt = dataset.Tables[“JobOper”];

for (int i = 0; i > dt.Rows.Count; i++)

{

dt.Rows[i][“OpComplete”] = “True”;

adapter.Update();

}

}

}

Suggested

Becky Lipnick

Recent Posts

Salesforce Integration Consulting And Solution Options

Salesforce integration consulting is about more than just finding a partner with experience in integrations.…

8 months ago

Hand-Picked Digital Marketing Platforms for Manufacturers

Platform: HubSpot Where It Shines: Email marketing - easy to use email lists, automation, and…

9 months ago

2024 Manufacturing Trends

Don’t be left behind by neglecting these 2024 manufacturing trends.

9 months ago

Maximizing ROI with CloudSuite Industrial

With a comprehensive ERP like CloudSuite Industrial (CSI) from Infor, there are countless possibilities for…

10 months ago

Infor ERP Releases Innovative Features

An Infor ERP solution isn’t just a temporary fix to today’s issues, it’s an investment…

10 months ago

Infor ERP Integrations

An Infor ERP can dramatically improve your operations, but with an ERP integration, you can…

10 months ago