[SOLVED] Global Variable in Grid Application (Invoice)

Hello

I am generating a Invoice using Grid Application and passing invoice no as a global variable glo_id,
but when I export to PDF,Word or any other format it generate only one id , which is I generate first time.
If creates first id =10 then its generate but when i pass id=12 then its generate first Id 10 , but Grid application showing details of id 12.

When clear the browser cache then its create new Id , and continuously exports same id.
This application is working fine in my Development Server, but above issue pessist in Deploy server.

I think tish issue is the PHP Cache handling , I am not aware about cache handling .
can anyone suggest why the global variable are not update.

Thanks

I suggest to type the message in your languiage, then use G-translator. It is hard to understanf your intention and language.
Often problems with ID’s come from the INDEX/KEY. Make sure you have that assigned in the App, it is unique and there are no possible duplicates. You aslo should show you table structure so people have better idea. ASKING QUESTIONS without placing precise details is a bad idea.

Thanks for your reply.

But this application is working fine in php 7.4 when I updated it to php 8.1 in my production server then I am facing this issue. I have already checked step by step monitoring id global variable at every point using echo it is showing new id but when I export that time it is using old id.

I recommend using a new global id for this, and check the final value, may be you are changing the value at some point.
I don’t recommend using the same id as column names, I had problems with it.

I have Created with new global variable like glo_LR , glo_InvoiceNo etc. but still same issue.

Also check the parameters send from one app to the second one, may be the global id is receiving a wrong value

Thanks for your reply.

Before sharing the solution I would like to say that I think ScriptCase is a very useful RAD tool to develop web application easily and quickly but it is a little behind in technology. I say this because Sciptcase repeatedly fails to support the latest versions of PHP. When new versions of PHP are made public and the old version reaches end of life, even then Scriptcase only supports the old version of PHP 8.1. It does not support the latest one such as PHP 8.3 or 8.4 properly. Also, whenever a new version of PHP is added it comes with a bunch of errors as well.

Coming to the solution.
My new production server is OS Almalinux 9.5 + WHM/cPanel installed with Apache + MariaDB & Latest PHP version (8.2,8.3,8.4) in this server. When I deployed the application, I was facing issues due to PHP 8.2. So I removed all the latest PHP versions and installed only PHP 8.1, then automatically the application started executing properly and the issue got resolved.

You cannot use php versions that are higher than the one in the development environment. That always has been the case. SC is also very slow in adapting new PHP versions, the last time they only supported an end-of-life version of PHP before migrating. Has also to do with the encryption software they use. I think that SC is way behind, but most devs have a giant code base and cannot easily move. So it is not easy to move to something more modern.