Transheader.RESET;
Transheader.INIT;
IF Transheader.FINDFIRST THEN
REPEAT
IF Transheader.Status=Transheader.Status::Released THEN
IF Transheader."Date Created" < WORKDATE-2 THEN BEGIN
TransHeaderXML.SETTABLEVIEW(Transheader);
TransHeaderXML.Released();
//MESSAGE('Done');
END;
UNTIL TransHeader.NEXT=0;
Transheader.RESET;
Transheader.INIT;
IF Transheader.FINDFIRST THEN
REPEAT
IF Transheader.Status=Transheader.Status::Released THEN
IF Transheader."Date Created" < WORKDATE-2 THEN BEGIN
TransHeaderXML.SETTABLEVIEW(Transheader);
TransHeaderXML.Released();
MyFile.create('C:\myxmlfile' + Transheader."No." + '.xml');
MyFile.CREATEOUTSTREAM(outstr);
TransHeaderXML.SETDESTINATION(outstr);
TransHeaderXML..EXPORT;
MyFile.close;
END;
UNTIL TransHeader.NEXT=0;
MESSAGE('Done');
You need to do it something like this.
Ahmed Rashed Amini
Independent Consultant/Developer
I am using this XMLPort to create a notification.
So i have this report, and when i run it via Navision Interface (C/Side) it is ok and works perfect.
But i have added this as a report to be executed via NAS(i have created a job queue ect..), and NAS executes this report but don't send a notification. When i run this report manualy it is working and sends a notification.
No error is displayed.
I have also debugg this code(with NAS Debugger) and it goes throught this code same as i run manualy report.
But it does not send the notification. I use the same Windows User for NAS and when i run report manually.
With the same user i run report manualy and via NAS.
I don't have clear idea, what XMLPort does export when i use it for business notification(what exactly xmlport do, exports some .xml files, or what, if it exports where can i locate a files that business notification reads).
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Transheader.RESET;
Transheader.INIT;
IF Transheader.FINDFIRST THEN
REPEAT
IF Transheader.Status=Transheader.Status::Released THEN
IF Transheader."Date Created" < WORKDATE-2 THEN BEGIN
TransHeaderXML.SETTABLEVIEW(Transheader);
TransHeaderXML.Released();
//MESSAGE('Done');
END;
UNTIL TransHeader.NEXT=0;
You need to do it something like this.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
So i have this report, and when i run it via Navision Interface (C/Side) it is ok and works perfect.
But i have added this as a report to be executed via NAS(i have created a job queue ect..), and NAS executes this report but don't send a notification. When i run this report manualy it is working and sends a notification.
Any suggestion.
Also, make sure the user running nas has admin permission.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have also debugg this code(with NAS Debugger) and it goes throught this code same as i run manualy report.
But it does not send the notification. I use the same Windows User for NAS and when i run report manually.
With the same user i run report manualy and via NAS.
I don't have clear idea, what XMLPort does export when i use it for business notification(what exactly xmlport do, exports some .xml files, or what, if it exports where can i locate a files that business notification reads).
Need help!
Thanks in advice.
If you are not a partner, see if you can get help.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I hope at least someone had this problem, and can help me! :roll: