BuscaCampoTablaExtendida(RecRef : RecordRef;Texto : Text[50];VAR Devuelve : Variant) CASE RecRef.NUMBER OF 36:BEGIN RecRef.SETTABLE(Rec36); IF rec36Extendida.GET(Rec36."Document Type", Rec36."No.") THEN BEGIN CASE Texto OF 'TextoIdioma':Devuelve := rec36Extendida."Posting Description Language"; END; END; END; 37:BEGIN RecRef.SETTABLE(Rec37); //Rec37.SETRECFILTER; vCode:=Rec37."Document No."; vLineNo:=Rec37."Line No."; //try replacing vcode and vlinenno by Rec37."Document No." and Rec37."Line No." and it wont work IF rec37Extendida.GET(Rec37."Document Type", vCode,vLineNo) THEN BEGIN MESSAGE('ok'); CASE Texto OF 'TextoIdioma':Devuelve := rec37Extendida."Description Language"; END; END; END; END;
Answers
Hi,
The line commented out was a trial of hardcoding some fields.
If you look at the example in screen capture, I use "document type" from T37 in the first column of the get(). Extended table "document type" its been copied from source, I just compared optionstring for both tables.
It´s an "extended table" with the same key fields. We compared this already here.
If any1 would like to try, Find table attached:
https://ufile.io/1mats
Function to be called:
Shit i sent wrong table, sorry about that. I was busy with other topics and...
Its lines...
you call from SL subform to:
RecRef.GETTABLE(Rec);
CU.BuscaCampoTablaExtendida(RecRef, 'TextoIdioma', TextoIdioma);
I updated the link with t37.
In my get I use 3 of em:
37:BEGIN
RecRef.SETTABLE(Rec37);
//Rec37.SETRECFILTER;
vCode:=Rec37."Document No.";
vLineNo:=Rec37."Line No.";
//try replacing vcode and vlinenno by Rec37."Document No." and Rec37."Line No." and it wont work
IF rec37Extendida.GET(Rec37."Document Type", vCode,vLineNo) THEN BEGIN
How come this works and this does not?
IF rec37Extendida.GET(Rec37."Document Type", Rec37."Document No.";,Rec37."Line No.";) THEN
Just have a look in that nav2009R2 build 32012.
if you can, of course.
Its really strange.