Assuming salespersonid is required, the following 2 results were found.
JOIN "Invoice Items vs SoPo Items" invsopoitm ON invsopoitm."Invoice ID" = i."Invoice ID" LEFT OUTER JOIN( SELECT ab2."SalesPersonID" AS "SalesPersonID", ab2."MonthYear" AS "MonthYear", SUM(if_null(ab2."ItemMarginExclTax", 0)) AS "Credit Margin excl...
to do absolutely nothing but I've left it in there in case one day I figure it out: // init m_CreateSO = Map(); v_SalesPersonID = ""; // // eval v_BooksOrgID = 12345678901; r_SoDetails = zoho.crm.getRecordById("Sales_Orders",p_SoID); // // check if...