Usually on the request Page there is a Boolean field called "WithLog". This control wither the report would be printed with logo or not.
How can i check if the report was called by a user or by a background Process? Reason is i want the report to be always printed with logo if its was called with a background process.
*This post is locked for comments
No, with the "Send order confirmation by mail" button the report is called by the NAV client (the user that click the button).
GUIALLOWED is TRUE if the action is performed via the NAV Windows Client
GUIALLOWED is FALSE if the action is performed by the NAV Job Queue (backgroun process).
In your case, GUIALLOWED is TRUE when you click the "Send order confirmation by mail" button.
On the sales order there is the fucntion "Send order conformation by mail". When you fire this action the report will be called on the background and it will be saved as PDF.
Since the report is called int the Background , i consider this as a system action not a user action. If i wrote the code like this "IF GUIALLOWED THEN "Mit Logo" := TRUE;" the Logo will always come no matter what. I tried to call the report from the development environment and now the logo is always printed.
That's why I assume that the correct code is "IF NOT GUIALLOWED THEN "Mit Logo" := TRUE; ". but still its not working.
You need to write IF GUIALLOWED THEN "Mit Logo" := TRUE;
I did something like this on Trigger "OnPreReport":
IF NOT GUIALLOWED THEN "Mit Logo" := TRUE; ---> But its not working, I want the logo to be always printed if the report was called by the system.
GUIALLOWED means called from user
NOT GUIALLOWED - called from system
You can write a code like this:
IF GUIALLOWED THEN
withLogo := TRUE //this is called by a user in your system (user interface)
ELSE
withLogo := FALSE; //This is called by a job
Hi, Thanks for your answer
But I want something like this:
If it was called from system then -----> How to translate this?
// withLogo = True;
Else
// withlogo =FALSE;
You can check it by using:
IF GUIALLOWED THEN
//executed from a user
ELSE
//executed from a job
Sohail Ahmed
2
mmv
2
Amol Salvi
2