Good Day,
I have a question regarding using references. I have a routine that dynamically grabs the table number from a recordset (110 = Sales Shipment Header), filters it based on certain criteria and gets records from that. I have all of these values stored in a Rec Ref and Field Ref variable. I then have to pass this information into an XMLPort and export it. The XML Port wants a specific filtered table but I can't figure out how to determine dynamically what table I am using and how to filter it. I cant pass the reference values. Is there anyway to define a variable to dynamically point to a specific table, filter it and pass it to the XML Port export. I appreciate the help in advance.
RecRef.OPEN(TableNo);
FelRef1 := RecRef.FIELD(EDIConfigRec.FieldFourToFilter);
FelRef2 := RecRef.FIELD(EDIConfigRec.FieldTwoToFilter);
FelRef3 := RecRef.FIELD(EDIConfigRec.FieldOneToFilter);
FelRef4 := RecRef.FIELD(EDIConfigRec.FieldThreeToFilter);
FelRef1.SETFILTER('%1',EDIConfigRec.FieldFourFilterValue);
FelRef2.SETFILTER('%1',EDIConfigRec.FieldTwoFilterValue);
FelRef3.SETFILTER('%1',EDIConfigRec.FieldOneFilterValue);
FelRef4.SETFILTER('<>%1',EDIConfigRec.FieldThreeFilterValue);
XMLPORT.EXPORT(OutboundPort,OutS,??TableRef.GETTABLE(TableNo)??);
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.