Business Connector Cache/Store Data In Memory

dynamics ax

During development in Dynamics AX 2009 and using business connector to get data from Dynamics AX i faced a problem that result were stored in cache and not reflecting the changes, to resolve this issue when i made changes on Dynamics AX i restart the AX service but after some time it stops working and it again not reflecting the changes, so i add following line of code in business connector code after logging in and it start working.
 Axapta ax = new Axapta();  
 ax.LogonAs(credentials.UserName, credentials.Domain, new System.Net.NetworkCredential(credentials.UserName, credentials.Password), null, null, null, null);  
 ax.CallStaticClassMethod("SysFlushAOD","doFlush");    
 ax.CallStaticClassMethod(“SysFlushAOD”, “doFlush”);  

Comments

  1. thanks a lot i was strugglin on that

    ReplyDelete
  2. Thanks a lot. You're a life saver. I was stuck and tried all I could which I knew about. Then I tried your method and it worked like a charm

    Thanks

    ReplyDelete

Post a Comment

Popular posts from this blog

X++ Get Start Date and End Date of Month

Dynamics AX 365 : The name does not denote a class, a table or an extended data type

Error while setting server report parameters. Error message: The permissions granted to user are insufficient for performing this operation. (rsAccessDenied)