I need to create a Job with the click of a button from another screen. So far, I have been able to create the JobHead information just fine, but when I go to create a Make to Stock Demand link, I get an error. I am using the GetNewJobProd method (as shown in my trace) and filling the correct parameters (as shown in my trace), but when I run it, i get the run time error of:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
Table: JobProd
Company=‘VN’ JobNum=‘2455’ PartNum=‘00S1’ OrderNum=‘0’ OrderLine=‘0’ OrderRelNum=‘0’ WarehouseCode=’’ TargetJobNum=’’ TargetAssemblySeq=‘0’ TargetMtlSeq=‘0’ SysRowID=‘00000000-0000-0000-0000-000000000000’: ForeignKeyConstraint PartProd requires the child key values (VN, 2455, 00S1) to exist in the parent table.
I’ve looked up “PartProd” and I don’t think it exists. Has anyone gotten this method to work? Do you know what I’m missing? I thank you for your help.
Here are few initial things to check/consider:
That is a valid order/line/release combo
You didnt skip any updates that were in the trace (meaning the Db doesnt know about values you set)
In the trace, before CheckChange, is the RowMod set to any particular value? i.e. “U”