Configurator doc rules writing to JobHead

I am trying to write from a configurator a value into the JobHead.UserChar01 field, the syntax says its correct but when i use orderjobwizard from a sales order, the value does not write to the UserChar01 field. (boxes are being ticked to say create job, get details etc)

do i need to write this at quote / order stage and then have a BPM to copy this value over or should it just work as one would expect!

cant test via MRP at the moment because MRP is stuck - ticket in with Epicor about this.

Do the rules work correctly when you add this part to a Job manually?

If so, then we can narrow the issue to the Order Job Wizard.

Not sure how i would do that tbh as its a configured part? Can you point me in a direction of how to do that?

Can you share the code in your document rule? This can fail sometimes if you’re execution rule has the wrong context, or the context is set incorrectly in the script.

i sure can!

JobHead.PartDescription bit writes fine, HOWEVER, i am not sure if this is because its pulling from the order or if its using the configurator value… may need to test this theory further to see whats actually happening.


if(Context.Entity == "QuoteDtl")
{
    QuoteDtl.LineDesc = Inputs.SalesDesc_edt.Value;
    QuoteDtl.OrderQty = Inputs.Qty_dec.Value;
    QuoteDtl.SellingExpectedQty = Inputs.Qty_dec.Value;
    QuoteDtl.ReadyToQuote = true;
    //Product Group?
    //Sales Category?

    if(Context.QuoteNumber > 0 && Context.QuoteLineNumber > 0 && Inputs.GetQuoteDetails_chk.Value)
    {
        UDMethods.GetQuoteDetails_SS(Context.QuoteNumber, Context.QuoteLineNumber);
        Pricing.QuotePrice = Inputs.Price_dec.Value;
    }
}

if(Context.Entity == "OrderDtl")
{
    OrderDtl.LineDesc = Inputs.vImageValue.Value;
    OrderDtl.OrderComment = Inputs.SalesDesc_edt.Value;
	OrderDtl.PickListComment = Inputs.JobDesc_edt.Value;
    OrderDtl.OrderQty = Inputs.Qty_dec.Value;
    Pricing.OrderPrice = Inputs.Price_dec.Value;
    //Product Group?
    //Sales Category?
}

if(Context.Entity == "JobHead")
{
    JobHead.PartDescription = Inputs.vImageValue.Value;
    JobHead.DrawNum = Inputs.vImageValue.Value;
    JobHead.UserChar1 = Inputs.vImageValue.Value;
    JobHead.UserChar2 = Inputs.vImageValue.Value;
    JobHead.JobCode = Inputs.vImageValue.Value;
    //Product Group?
    //Sales Category?
    //Planner?
}

I see you have a context.Entity of QuoteDtl in there too. Is the OrderJobWizard getting details from the quote?

not always sometimes its configured at order entry - depends on if we are quoting a customer or if its repeat business and a customer placing a new order of possibly similar products

The JobHead context executes at the time the job is created, and it should be able to read the configurator values regardless of whether it was from a quote or from an order. It certainly can read them in the Method Rules, although those do actually compile when the configurator is saved, even though the job doesn’t exist yet.

Are you changing the PartNum or RevisionNum at all via configurator? I’m wondering if there’s some disconnect happening between the job and the configurator.

Do me a favor and try this:

Change the JobHead.UserChar1 in document rules to a static string. Something like “UserChar1 Test”. Then approve the configurator and configure a Quote, convert to order, and create the job. Check if that static string populates in JobHead.UserChar1

Will certainly give this a go and let you know how i get on.

Thanks once again Kevin…so far you have helped me with a few problems!

Glad to help.

If it does accept the static string, as a workaround you can create a document variable and set it in the OrderDtl / QuoteDtl context, then set your UserChar to the Doc Variable in JobHead:

// Set Document String variable in the DocRules screen in Configurator Entry


if(Context.Entity == "QuoteDtl")
{
    QuoteDtl.LineDesc = Inputs.SalesDesc_edt.Value;
    QuoteDtl.OrderQty = Inputs.Qty_dec.Value;
    QuoteDtl.SellingExpectedQty = Inputs.Qty_dec.Value;
    QuoteDtl.ReadyToQuote = true;
    //Product Group?
    //Sales Category?

    if(Context.QuoteNumber > 0 && Context.QuoteLineNumber > 0 && Inputs.GetQuoteDetails_chk.Value)
    {
        UDMethods.GetQuoteDetails_SS(Context.QuoteNumber, Context.QuoteLineNumber);
        Pricing.QuotePrice = Inputs.Price_dec.Value;
    }

    MyDocVar = Inputs.vImageValue.Value;
}

if(Context.Entity == "OrderDtl")
{
    OrderDtl.LineDesc = Inputs.vImageValue.Value;
    OrderDtl.OrderComment = Inputs.SalesDesc_edt.Value;
	OrderDtl.PickListComment = Inputs.JobDesc_edt.Value;
    OrderDtl.OrderQty = Inputs.Qty_dec.Value;
    Pricing.OrderPrice = Inputs.Price_dec.Value;
    //Product Group?
    //Sales Category?

    MyDocVar = Inputs.vImageValue.Value;
}

if(Context.Entity == "JobHead")
{
    JobHead.PartDescription = Inputs.vImageValue.Value;
    JobHead.DrawNum = Inputs.vImageValue.Value;
    JobHead.UserChar1 = MyDocVar;
    JobHead.UserChar2 = Inputs.vImageValue.Value;
    JobHead.JobCode = Inputs.vImageValue.Value;
    //Product Group?
    //Sales Category?
    //Planner?
}
1 Like

You can configure a part in a job (as long as it’s not a sales kit) by adding the configured part and then selecting “Get details…”. This will trigger the configurator for that part. The location of the “Get details…” menu item will depend on what version you’re running. It’s in the overflow (vertical dots) menu in Kinetic or under “Actions” in Classic.

Thanks @kve for offering great advice. This gave me an idea how to fix a different issue I’m having.

1 Like