XMLPort permission error

mgiffordmgifford Member Posts: 44
edited 2009-09-08 in NAV Three Tier
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

  • mgiffordmgifford Member Posts: 44
    In case anyone else can use the info - this turned out to be reported as a bug to the dev team - hopefully we will see a hotfix or resolution soon. Apparently when you apply permissions to an XMLPort to allow for updates to a "protected" table - it is causing the RTC to crash. This seems to be true in RTM and SP1. In my case, I originally didnt have the permissions applied and when I tried it - it would crash. So I naturally figured I had been doing something wrong. In the end, I just changed it to log my records in a custom table rather than mark then in the ledger table.
Sign In or Register to comment.