# Warn on blank Product Group on Order Entry Lines **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2016-11-28 14:54 UTC **Views:** 1733 **Replies:** 6 **URL:** https://www.epiusers.help/t/warn-on-blank-product-group-on-order-entry-lines/36428 --- ## Post #1 by @ckrusen I want to display an indicator (use an epiShape) on the Order entry form's Summary page, if any of the Order Lines have a blank Product Group. In the past I used a BPM to throw an exception if line was saved with a blank PG. But that caused problems when trying to pushing or pulling in a Quote to an Order. So we're settling for just having an indicator that shows the order has one or more lines with blank PG's. Ideally, I'd like to make it so the Order can't be printed unless all PG's are assigned, but I haven't figured out how to intercept the printing. I can make a BPM based on the Print dialog popping up and checking the report name. But that I'd prefer to generate a message prior to the Print dialog box. Anyway ... I'd like the customization to set the epiShape to Red if any order line has a blank PG. Trigger the check of this when a) On form load, and b) the change of any order line. Thanks in advance --- ## Post #2 by @bmgarver Just a suggestion. We check the product group in both the Order and Quote with a BPM exception to verify the line has been assigned to a Product Group. This eliminates the issue when converting the Quote to an Order if everything is required to have a Product Group. --- ## Post #3 by @ckrusen Hmmm ... so simple .. it just might work! --- ## Post #4 by @nhutchins Not sure about the stopping printing, but here is the code I use in the Scheduling board screen customization to show an epishape for the job status. '''cs // ************************************************** // Custom code for JobSchedulingBoardForm // Created: 2/20/2016 5:04:25 PM // ************************************************** using System; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Windows.Forms; using Erp.UI; using Ice.Lib.Customization; using Ice.Lib.ExtendedProps; using Ice.Lib.Framework; using Ice.Lib.Searches; using Ice.UI.FormFunctions; public class Script { // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! ** // Begin Wizard Added Module Level Variables ** // End Wizard Added Module Level Variables ** // Add Custom Module Level Variables Here ** public void InitializeCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines ** // Begin Wizard Added Variable Initialization // End Wizard Added Variable Initialization // Begin Wizard Added Custom Method Calls this.epiTextBoxC1.ValueChanged += new System.EventHandler(this.epiTextBoxC1_ValueChanged); // End Wizard Added Custom Method Calls } public void DestroyCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines ** // Begin Wizard Added Object Disposal this.epiTextBoxC1.ValueChanged -= new System.EventHandler(this.epiTextBoxC1_ValueChanged); // End Wizard Added Object Disposal // Begin Custom Code Disposal // End Custom Code Disposal } private void epiTextBoxC1_ValueChanged(object sender, System.EventArgs args) { //Define DataView EpiDataView edv = oTrans.Factory("JobHead"); // Notify JobReleased Status if (edv.Row>= 0) { if (Convert.ToBoolean(edv.dataView[edv.Row]["JobReleased"]) == true) { shpJobStatus.Status = (Ice.Lib.Framework.StatusTypes)0; shpJobStatus.EnabledCaption = "Released"; } else { shpJobStatus.Status = (Ice.Lib.Framework.StatusTypes)2; shpJobStatus.EnabledCaption = "Not Released"; } } // Notify Job Schedule Locked Status if (Convert.ToBoolean(edv.dataView[edv.Row]["SchedLocked"]) == true) { shpSchedLocked.Status = (Ice.Lib.Framework.StatusTypes)2; shpSchedLocked.EnabledCaption = "Sched Locked"; } else { shpSchedLocked.Status = (Ice.Lib.Framework.StatusTypes)0; shpSchedLocked.EnabledCaption = "Sched UnLocked"; } } } ''' Hope it helps! Norman Hutchins System Administrator Howell Laboratories, Inc. --- ## Post #5 by @Nancy We do the same thing. All quote lines must have product group. All sales order lines must have product group. One can also expose the Product Group field in the order lines summary section on summary tab, so user can see what line/s missing the product group. Nancy --- ## Post #6 by @ckrusen I got the BPM working, but has a drawback I'd like to remove. Whenever a Part on the Fly is first entered in the P/N field, the warning pops up before the user has the chance to enter a Product Group. How can I make it so the BPM only runs on updates, and not additions? I'd like it to check all lines, except the one just created. It will be checked when it is saved - after other fields are entered. And whats the difference between "updated row' and 'changed' row? --- ## Post #7 by @bmgarver Changed includes both Added and Updated rows. Pre-Processing BPM on the Quote.Update method. QuoteDtl.ProdCode field of the **updated** row is equal to the '' expression --- **Canonical:** https://www.epiusers.help/t/warn-on-blank-product-group-on-order-entry-lines/36428 **Original content:** https://www.epiusers.help/t/warn-on-blank-product-group-on-order-entry-lines/36428