We have an install of nav2009 (db srvr and app servers are seperate). I developed an XMLPort to export some check information from Check Ledger Entry table. When it is done it marks a custom field as true to indicate that it has been processed before. Other details are that it is a fixed width format and I have a codeunit that sets the appropriate filters/filenames/etc and ultimately runs the XMLPort.
When any user runs it even users in the SUPER group - they receive an error when the xmlport itself is trying to be processed - indicating that the first item inthe xmlport could not be processed. Upon looking in the CLIENT event log the event that is recorded ultimately says 'You do not have permission to modify records in the Check Ledger Entry table.'
pagePospayInput.RUNMODAL;
Filename := 'C:\SERVICEFILE.TXT';
RunDate := pagePospayInput.GetRunDate;
IF EXISTS (Filename) THEN
ERASE (Filename);
testfile.CREATE(Filename);
testfile.CREATEOUTSTREAM(teststream);
_CheckLedger.SETRANGE(PosPay, FALSE);
_CheckLedger.SETRANGE("Document Type", _CheckLedger."Document Type"::Payment);
_CheckLedger.SETRANGE("Check Date" , 0D,RunDate);
_CheckLedger.SETCURRENTKEY("Bank Account No.", "Check Date");
xmlPosPay.SETTABLEVIEW(_CheckLedger);
xmlPosPay.SETDESTINATION(teststream);
xmlPosPay.EXPORT;
testfile.CREATEINSTREAM(testinstream);
tofile := FORMAT(TODAY(), 0, '<month,2><day,2><year4>') + '.prn';
DOWNLOADFROMSTREAM(testinstream,'Save Output As','C:\POSPAY\', 'prn Files (*.prn)|*.prn',tofile);
testfile.CLOSE;
ERASE(Filename);
MESSAGE('Export complete');
The XMLPort runs fine on my all in one development machine with both my dev license and the clients license. My question is who/what needs the permissions added and how to do so. Does the identity of the service (AD User) need permissions within the application?
I checked and the file on the app tier is getting created successfully although empty because of the crash.
Also,i have tried adding permissions to the xmlport and codeunit for that table and when i do that, the RTC crashes both on dev env and also in production environment.
Comments