You just have to run a trace on creating a plant and re-create it in code lkike I did the add whse portion.
Jose C Gomez
Software Engineer
T: 904.469.1524 mobile
Quis custodiet ipsos custodes?
On Tue, Nov 19, 2013 at 2:04 PM, <livingstonmh@...> wrote:Â<div> <p></p><p>Do you happen to know how the Plant whse records are created? I used your example and edited it, but I am receiving an error:</p><p> <font size="1"></font></p><p>Invalid Plant. Part not defined as existing in this Plant.</p>
Â
Â
I am not seeing a method that would create this record.Â
---In vantage@yahoogroups.com, <jose@...> wrote:
Morning,
We added a new warehouse and needed to have it enabled for all parts. I
called Epicor and they weren't very helpful (as usual) so I wrote the
following ABL Script feel free to use it.
The script below is Free to use as Is and it is not intended for any
purpose so if it breaks your stuff don't call me :). I take no liability or
responsibility test everything before putting into production
{bo/Part_ds.i}
DEFINE VARIABLE hBO AS HANDLE NO-UNDO.
RUN bo/Part.p PERSISTENT set hBO no-error.
FOR EACH Part WHERE Part.Company='YOUR COMPANY':
RUN GetByID in hBO(INPUT Part.PartNum, {&output_dataset_PartDataSet})
no-error.
RUN GetNewPartWhse in hBO({&input-output_dataset_PartDataSet}, INPUT
Part.PartNum, INPUT 'YOUR PLANT').
FOR EACH ttPartWhse WHERE ttPartWhse.RowMod='A':
Assign ttPartWhse.WarehouseCode='2'
ttPartWhse.WarehouseDescription='10 Maybrook'
ttPartWhse.PartNumPricePerCode='E'.
END.
RUN Update in hBO({&input-output_dataset_PartDataSet}).
END.
DELETE OBJECT hBO.
E: jose@…
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>
Quis custodiet ipsos custodes?
[Non-text portions of this message have been removed]
</div> <div style="color:#fff;min-height:0;"></div>