web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Dynamics GP tables cache not cleared after company switch

(0) ShareShare
ReportReport
Posted on by 515

I have two company database with 'TWO' and 'THREE'. In each company database I have added a table (lets say 'ABC') which hold some customised company config values.

The problem is when I switch from one company to another company I am getting records from table of first company database. If I switch from company TWO to THREE and tried to read my ABC table, found that get first table command executed against first company database 'TWO'. 

I am not getting why GP execute query for previously logged in company database instead of current logged in company?

*This post is locked for comments

I have the same question (0)
  • soma Profile Picture
    24,410 on at
    RE: Dynamics GP tables cache not cleared after company switch

    Technically its a good findings. Keep it up.. Good luck.......

  • Community Member Profile Picture
    on at
    RE: Dynamics GP tables cache not cleared after company switch

    Good to hear that your problem is solved.

  • Verified answer
    ram shenkar Profile Picture
    515 on at
    RE: Dynamics GP tables cache not cleared after company switch

    Thanks all of you for your reply.

    I got solution here, I am having a hidden form and same table was copied on that form. That hidden form is always open that why the related table also always connected with sql.  I close that form before user change company and it works. 

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Dynamics GP tables cache not cleared after company switch

    We can only give suggestions based on your inputs. Have you tried debugging your code? If not, I would recommend you to try the methods below.

    Debug your code by Dexterity >>Test mode

    or by copying the extracted dictionary to the GP folder and add this script"ScriptDebugger= TRUE" in the Dex.ini file in the GP installed >>Data folder and start debugging your code and definitely you can able to find the problem and fix it.

    Note: Before changing the dex.ini file take a back up.

  • soma Profile Picture
    24,410 on at
    RE: Dynamics GP tables cache not cleared after company switch

    Can you share the trigger registration script?

  • ram shenkar Profile Picture
    515 on at
    RE: Dynamics GP tables cache not cleared after company switch

    Manjunath

    I don't have company ID field in my table. Do you mean to say 'Intercompany ID' of Dynamics GP?

  • ram shenkar Profile Picture
    515 on at
    RE: Dynamics GP tables cache not cleared after company switch

    This script already written after add successful login record of GP. Do you want me to change trigger?

    And one more update this happens only with my one table rest of the tables are working fine.

  • Suggested answer
    Manjunath Vemula Profile Picture
    1,197 on at
    RE: Dynamics GP tables cache not cleared after company switch

    You can use the Company ID field by setting the value and then do get first. This can get you results for that company.

    Hope this helps.

  • Suggested answer
    soma Profile Picture
    24,410 on at
    RE: Dynamics GP tables cache not cleared after company switch

    Hope you have written above script on some trigger functions. If so, check the trigger and change registration to After/before switch company then try again.

    Hope this helps!!!

  • ram shenkar Profile Picture
    515 on at
    RE: Dynamics GP tables cache not cleared after company switch

    Hi Shan,

    Both tables from different companies contain different records.

    dex code to get record from table (only one record in both tables) -

    release table ABC;

    clear table ABC;

    range clear table ABC;

    get first table ABC;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
babubaskaran@outlook.com Profile Picture

babubaskaran@outloo... 2

#1
Yng Lih Profile Picture

Yng Lih 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans