Hello,
Definitely a NEWBY question - but basically I have a question concerning if we should use eConnect (and web services) or go against the base tables?
Naturally if we want to have a "approved" method to get at the GP data, then eConnect is the way to go. But we have also seen that some data (we think) is not available using web services. (See SQL below with ugly UNION that I hope will be solved with web services.) Also it seem that via the example Microsoft does not have anything against going against the base tables as they do have examples in their blogs and such.
Also cannot find any official guidance other than eConnect has some benefits like consistency of service definition.
Thanks - Allen
SELECT TOP 100 PERCENT rtrim(g0.actnumbr_3) + '-' + rtrim(g0.actnumbr_2) + '-' + rtrim(g0.actnumbr_4) + '-' + rtrim(g0.actnumbr_1) + '-' + rtrim(g0.actnumbr_5) as [AccountCode],
g0.actnumbr_1, g0.actnumbr_2, g0.actnumbr_3, g0.actnumbr_4, g0.actnumbr_5,
g1.CRDTAMNT, g1.DEBITAMT, g1.perdblnc, periodid, g1.year1,
(CASE WHEN g0.pstngtyp = 0 THEN 'B' ELSE 'I' END) AS Posting_Type,
g0.tpclblnc AS Typical_Balance, g1.actindx,
$(QUERY_GP_Account) as [AP_Account],
$(QUERY_GP_Level) as [AP_Level]
FROM gl00100 AS g0
INNER JOIN gl10110 AS g1 ON g0.actindx = g1.actindx
WHERE g1.year1 >= $(DATE_QueryBeginYear) AND g1.year1 <= $(DATE_QueryEndYear)
UNION
SELECT TOP 100 PERCENT rtrim(g0.actnumbr_3) + '-' + rtrim(g0.actnumbr_2) + '-' + rtrim(g0.actnumbr_4) + '-' + rtrim(g0.actnumbr_1) + '-' + rtrim(g0.actnumbr_5) as [AccountCode],
g0.actnumbr_1, g0.actnumbr_2, g0.actnumbr_3, g0.actnumbr_4, g0.actnumbr_5,
g1.CRDTAMNT, g1.DEBITAMT, g1.perdblnc, periodid, g1.year1,
(CASE WHEN g0.pstngtyp = 0 THEN 'B' ELSE 'I' END) AS Posting_Type,
g0.tpclblnc AS Typical_Balance, g1.actindx,
$(QUERY_GP_Account) as [AP_Account],
$(QUERY_GP_Level) as [AP_Level]
FROM gl00100 AS g0
INNER JOIN gl10111 AS g1 ON g0.actindx = g1.actindx
WHERE g1.year1 >= $(DATE_QueryBeginYear) AND g1.year1 <= $(DATE_QueryEndYear)
ORDER BY [AccountCode], g1.year1, g1.periodid