Dear All,
I would like to ask you about CU I made that unable to work when I write it to C/AL editor of a form designer. The coding as follows:
record.COPY(Rec);
CurrForm.SETSELECTIONFILTER(record);
IF record.FIND(’-’) THEN BEGIN
record.“field” := code;
CU.aaa(record,record);
END;
all records are in the C/AL Global
In the CU itselfs :
C/AL Global function(jjj : Record “xxx”;AppltoDocType : Option;ApplytoDocNo2 : Code[20];ssss
nextlineno := nextlineno +10000;
record2.INIT;
record2.“Document Type” := record1.“Document Type”;
record2.“Document No.” := record1.“Document No.”;
record2.“hhh” := record1.“hhh”;
record2.“Resource No.” := record1.“Resource No.”;
record2.“Allocation Date” := record1.“Allocation Date”;
record2.INSERT;
Createwww(VAR qqq : Record “ddd”;jjj : Record “xxx”)
IF NOT record1.RECORDLEVELLOCKING THEN
record1.LOCKTABLE(TRUE,TRUE);
nextline := record.“field”;
record2.SETRANGE(“Document Type”,record1.“Document Type”::Order);
record2.SETRANGE(“Document No.”,record1.“Document No.”);
REPEAT
record2.SETRANGE(“Document No.”,record1.“No.”);
IF NOT record2.FIND(’-’) THEN
xxx(record,record2.“Document Type”::Order,
record2.“Document No.”,record.“Document Type”,record.“No.”,
record.Description,nextline);
UNTIL record.NEXT = 0;
Record 1 = record 2 and record is not as same as record 1 and record 2.
My purpose with the coding is similar with form 5805 tab functions. I would welcome for your kindness to reply and answers. tku…
Rgds,