CacheLookup property in Ax 2012 - dynamics-ax-2012

I created some elements in an already existing base enum, when I open the form to enter some records and to select the values in lookup, I can't see my elements until and unless I clear the cache.
Every time I want to create a record, I have to clear the cache first.
I tried restarting client, Restarting AOS, but nothing helps.
I checked the tables Cache lookup property and its selected to Entire table. Please help in resolving the issue, do I have to change the Cache Lookup property or it can be handled through some other way???

Try to clear user cache - .auc files located on the client machine.

Related

How to disable cache in Business Connector Dynamics AX 2009

When I try to get data from PriceDiscTable I get old data.
In this case I need to reconnect or disable cache in table properties (CacheLookup).
How can I get correct data without disabling CacheLookup property?
I tried
priceDiscTable.disableCache(true);
but problem still exist.
Try priceDiscTable.reread(). This will query the database to reread the record.
I changed code to
priceDiscTable.disableCache(true);
priceDiscTable.reread();
I restarted AOS clear all caches and *.auc files
Now it works fine

Save a string for later use in ASP.NET

I have a simple string that I would like to save for later use on an ASP.NET server. It is an authorization string for a web service. It mostly stays the same, but may expire every few months. It will be saved programmatically from a code-behind file. Is there a simple place I can save it?
Initial thoughts are:
File - seems reasonable
Database - we don't have one setup and it seems like a lot of overhead to hold a string
Session - this would be too short lived
Config file - Based on answer from MK_Dev this would require a web app restart. No go then.
Somewhere else that I don't know about, but would be perfect?
Another possibility is to create a custom registry key. Here is an article with some code examples: Manipulating and Editing Registry with .NET.
If you don't mind restarting the app when the value changes, then config file is the way to go. If you need it to be fully dynamic, you can add a config table to the database and update it when changes.
How about server side cache?
Check this out: http://msdn.microsoft.com/en-us/library/18c1wd61%28v=vs.71%29.aspx
If the string remains static for the most part, I would store it in Cache with an expiration and/or dependency. If you go the dependency route, you can use a file or store the string in the database, and it will update automatically if and when it's changed.
See this article for details: Caching Application Data
How about System.Environment variables?
System.Environment.SetEnvironmentVariable("mystring","asdf");
System.Environment.GetEnvironmentVariable("mystring");

vTiger doesn't recognize any user

I having a problem using vTiger.
Actually i had no problems but we had to format one of our servers and as the SQL has been backup'ed i had no worries about vTiger.
Just got vTiger folder backup'ed too, but when i had my server back and put the folder of vTiger into www and restored the database i had a few errors, mostly resolved by re-configuring config.inc.php because paths had changes. But after all the configuration is done again i can't login to my vTiger. He reachs the database but does not recognize any of the users. I alway get username or password is wrong. Have anyone experienced this? Is there any possible solution?
Had a similar problem a few days ago, it turns out my cookies were corrupt (Firefox). I cleared all related cookies, problem solved. Try first using some other browser to confirm. hth.
First I would check if the db is reached and populated with your data. Try connecting from the command line.
If you are working on Windows and have changed Vtiger's path, and you are using the bundled version, MySql path changes as well, but the Windows service can still be alive on the old path: in this case you must manually cancel the service and afterwards use the "Start Vtiger" button in order to create the new service.
Second, I would turn on the php debugging as explained here. In most cases, these steps should help you.
Have you checked user_privileges folder? in that you must have 2 files for particular user. eg. your user admin having id 1 in database then you must have user_privileges/sharing_privileges_1.php and user_privileges/user_privileges_1.php file
and open user_privileges_1.php file and check username/password in that file, if it's not same with your DB then change it manually.
Try this solution and let me know if it works.

Changing Global.asax variables from IIS

Can I change access or edit the values specified in Global.asax from IIS?? The reason is that I don't have the source code and the only change we need right now is to change the connection strings (database) specified in Global.asax.vb file.
Thanks!!
Usually, connection strings are specified in the Web.config for this very reason. If the values are hardcoded, there's no way for you to modify them unless you can change the code. You can setup an identical database (name, creds) and change some config settings so that your database server resolves to the same machine name. That's all I can think of...
Well, I was able to circumvent the issue. Not very elegant and might add to performance load, but was the simplest considering the work involved to recreate the project.
I created another aspx page and set the connection variables using the Application object in the Page's Page_Load, and then did a response.redirect to the previous default file. I was lucky as all code referred to the Application Object, and this was set only in Global.asax - had there been any code which directly specified the connection string - then I would be screwed!
The only overhead was that the Application_Start would be called only once - but overwriting those values with Page_Load will be called every time a request is made. Kind of trade-off I am ready to do.
I could not agree the previous answer as it mentioned the "Ideal" Case and the best practices - it did not solve my problem. The previous solution should be adopted if the previous sql server can be completely demoted.
Thanks Guys!

Why SOME users cannot update record through the browser?

We have a simple SQL Server database with an ASP.NET front end.
I can easily update a record from my browser.
Another person cannot: he edits the field and hits the "update" button, but the change is not propagated to the database. The old value remains. He is using Internet Explorer. I checked the database, and his change is not propagated. There is no error thrown.
He WAS able to edit in May. Today he can't. but I can.
I can even update it with the Google Chrome browser.
Any ideas why his browser can't update, but I can?
Thanks!
Check thoroughly your stored procedures and application structure, it might not be a browser issue at all. There must be some permission or user level problem in application.

Resources