Adding a Record via ABL

Below is code I have put together from snippets of conversations found on this list. Most of which, I believe come from Jose. Realizing I am running blind here, I tried to put together what I "think" is correct. I have not tried yet, so , If anyone could confirm or put me on the right track here I would appreciate it.

Object: As a new Order Release is created, I want to also create a corresponding UD01 record.

Q: Is there a limitation to the number of parameters I can pass?


1. I believe I put the following code in server/bpm/custom/MyCustomUD01.p

2. It will be called from a Method Directive ABL Code as Such: run bpm/custom/MyCustomUD01.p(myParam1, myParam2, myParam3).

{Bpm/Bpm.i &OBJECT_NAME="UD01"}
{bo/UD01_ds.i}

DEFINE INPUT PARAMETER myParam1 AS INTEGER.
DEFINE INPUT PARAMETER myParam2 AS INTEGER.
DEFINE INPUT PARAMETER myParam3 AS INTEGER.

{&TRY_PRIVATE}

DEF VAR h-UD01 AS HANDLE NO-UNDO.

RUN bo\UD01.p PERSISTENT SET h-UD01.

if VALID-HANDLE (h-UD01) THEN DO:

RUN GetaNewUD01 IN h-UD01 ( {&input-output_dataset_UD01DataSet} ) NO-ERROR.
for each ttUD01 where ttUD01.RowMod = "A":
assign ttUD01.Key1 = myParam1.
assign ttUD01.Key2 = myParam2.
assign ttUD01.Key3 = myParam3.
end.

RUN Update IN h-UD01 ({&input-output_dataset_UD10DataSet}) NO-ERROR.

end.
else do:
message "Could not create handle to UD01.p!".
end.
delete object h-UD01.

{&CATCH_PRIVATE}

Brenda



[Non-text portions of this message have been removed]