[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

smy

1/19/2006 10:52:00 PM

I'm trying to store the file name of a printed invoice during posting in a
global variable. Using SysGlobalCache doesn't seem to work, as for some
reason the global cache is reset between closing the print form and running
the invoice printing process. Is there any way to store a truly global
variable that can be accessed until the user exist the application?

Thanks!
3 Answers

Søren Tvede

1/23/2006 11:16:00 AM

0

You can store global variables for the session in i.e. the system Info class.
Declare your variable in the classdeclaration:

filename MyFileName

You then have to make a method to set and access the variable

filename MyFileName(filename _name = MyFileName)
{
MyFileName = _name;
Return MyFileName;
}

You will be able to set/get your variable using the infolog class

....
// to set the global variable
infolog.MyFileName("c:\temp\test.txt");
....
// to retrieve the variable, i.e.
print infolog.MyFileName();
....

--
Søren Tvede


"smy" wrote:

> I'm trying to store the file name of a printed invoice during posting in a
> global variable. Using SysGlobalCache doesn't seem to work, as for some
> reason the global cache is reset between closing the print form and running
> the invoice printing process. Is there any way to store a truly global
> variable that can be accessed until the user exist the application?
>
> Thanks!

trucosaxapta.com

1/23/2006 3:48:00 PM

0

Hi smy,

I think the main reason of your problem is explained here ...

http://www.axaptapedia.com/index.php/SysGlobalC...


Good Luck,

Mkz
--------------
http://www.trucos...
An Axapta tricks site in Spanish language :)



"smy" <smy@discussions.microsoft.com> escribió en el mensaje
news:90CCD2F4-0967-41AD-B981-F98FB14213F3@microsoft.com...
> I'm trying to store the file name of a printed invoice during posting in a
> global variable. Using SysGlobalCache doesn't seem to work, as for some
> reason the global cache is reset between closing the print form and
running
> the invoice printing process. Is there any way to store a truly global
> variable that can be accessed until the user exist the application?
>
> Thanks!


smy

1/24/2006 9:21:00 PM

0

Thank you both for the information.

Soren's code didn't work in its exact format, but I ultimately solved the
problem utilizing the Info class, so thank you for the inspiration!

"trucosaxapta.com" wrote:

> Hi smy,
>
> I think the main reason of your problem is explained here ...
>
> http://www.axaptapedia.com/index.php/SysGlobalC...
>
>
> Good Luck,
>
> Mkz
> --------------
> http://www.trucos...
> An Axapta tricks site in Spanish language :)
>
>
>
> "smy" <smy@discussions.microsoft.com> escribió en el mensaje
> news:90CCD2F4-0967-41AD-B981-F98FB14213F3@microsoft.com...
> > I'm trying to store the file name of a printed invoice during posting in a
> > global variable. Using SysGlobalCache doesn't seem to work, as for some
> > reason the global cache is reset between closing the print form and
> running
> > the invoice printing process. Is there any way to store a truly global
> > variable that can be accessed until the user exist the application?
> >
> > Thanks!
>
>
>