-- Macro (UF-165 in Video) @STORE1 = $[$4.0.0]; -- Store BP Code @STORE98 = $[$14.0.0]; -- Store Customer Ref. No. @STORE99 = $[$8.0.0]; -- Store DocNum Activate(2055); -- Open Credit Memo Freeze(); Set($[$3.0.0]|I); -- Set to item type document Set($[$4.0.0]|@STORE1); -- Set BP Code Set($[$14.0.0]|@STORE98); -- Set Customer Ref. No. UnFreeze(); Click($[$138.0.0]); -- Click Accounting Tab Click($[$498.0.0]); -- Hit Referenced Document Activate(); -- Activate Referenced Document window Freeze(); Set($[$5.1.0.LAST]|13); -- Set Transact. Type Set($[$5.3.0.LAST-1]|@STORE99); -- Set Doc. Number Set($[$5.254000015.0.LAST-1]|B1UP: Auto AR Invoice Reference); -- Set Remarks UnFreeze(); Click($[$540020001.0.0]); -- Close Referenced Information Window Activate(); -- Reactivate credit memo form Freeze(); Click($[$112.0.0]); -- Switch back to contents tab UnFreeze(); UF(UF-164); -- Run selection query -- SQL Report (UF-164 in Video) SELECT 'Y' AS "Credit" ,T0."ItemCode" AS "Item Code" ,T0."Dscription" AS "Item Name" ,T0."Quantity" ,T0."DiscPrcnt" AS "Discount" ,T0."PriceBefDi" AS "Unit Price" FROM INV1 T0 INNER JOIN OINV T1 ON T0."DocEntry"=T1."DocEntry" WHERE T1."DocNum" = @STORE99 --and T0."Quantity"<> 0 -- Format: 2[OITM|SEARCH];4[EDIT]; -- Check box for "First column is selection checkbox" -- Select Data Target: $[$38.1.0];;$[$38.11.0];$[$38.15.0];$[$38.14.0]