Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Custom Dictionary permissions issue

Posted on by Microsoft Employee

I have created a .NET add-in for GP2013.  It replaces the Direct Deposit ACH Creation process with one that  is pertinent to my client.  The application evaluates the data and creates a text file in a common folder.  The three production instances of GP run through Citrix.  Here is what is known:

1) The GP user is inconsequential (doesn't matter whose ID you use).

2) GP has no problem creating the file using the standard ACH creation process, no matter who is logged into Citrix.

3) If the user logs into Citrix as Administrator, GP can create the standard ACH file AND when running my Add-In (from the "Additional" menu), my ACH file is created as well.

4) If the user logs into Citrix as anyone else (other than Administrator), GP can create the standard ACH file BUT my Add-In receives a permissions error and it won't create the file.

Obviously, GP has some internal rights that I don't know about.  I also can't get an answer from the hosting company (their environment is out-sourced) about how to set the permissions for my app to create this file.

Any ideas or suggestions?

Don

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom Dictionary permissions issue

    Yes they do, especially since they can choose any folder they want.  They can choose their own "Documents" folder or a public "shared drive".

  • Suggested answer
    KirkLivermont Profile Picture
    KirkLivermont 5,985 on at
    RE: Custom Dictionary permissions issue

    Don,

    Do your users have read and write permission to the folder that contains your add in? It sounds like there is something that either needs to be read or written to a file in that folder.

    Kirk

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom Dictionary permissions issue

    Since the user can change the destination folder, that would be difficult.  However, in the default folder (C:\Users\Public\DD\ the permssions are set to "Everyone" with "Full Control" - we did this to test it.

    It should be noted that when I run this on MY environment (development) where I am NOT USING CITRIX, it doesn't matter who I'm logged in as.  That's why I think it is a combination of OS and Citrix settings.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom Dictionary permissions issue

    The code is not mine to share due to NDA restrictions, nor is it the problem since it is working when logged in as Administrator..  Thanks for the offer, though.  

    I can tell you the line that is failing is:

    Dim fsACH as FileStream

    Dim sFullFile as string = "filename.txt"

    ...

    fsACH = New FileStream(sFullFile, FileMode.Create, FileAccess.Write)              'FAILING LINE

    ...

  • MSD Profile Picture
    MSD 35 on at
    RE: Custom Dictionary permissions issue

    Could you please check the folder permission where you create the file for your login?

  • Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: Custom Dictionary permissions issue

    So your first issue is your file not creating on some path. If it will get created you will not get this error which is because of the NULL reference it is getting. Can you email me your code so I will check on my side what is the issue with file creation? ( I will check it with user other than administrator).

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom Dictionary permissions issue

    The message is "MyForm.MyButton_Click:  Object reference not set to an instance of an object.".  This fails when the program attempts to use a file that was "created" by this process.  Since the program can't create the file in the specified folder, the use of the object fails.

    The user has the ability to choose the folder where they want to create the file.  They have chosen folders in "Public Documents", their own "My Documents" folder, and the specific shared drive that GP is writing to.  None of these work for any user other than Administrator.

  • Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: Custom Dictionary permissions issue

    What exactly the error message you are getting.

    Where you are saving your custom ACH file, is it the same location where standard ACH file is saving?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Custom Dictionary permissions issue

    Richard - thanks for the reply.

    However, the issue is NOT with any SQL select or update statements or with the execution of a stored procedure - all things that would be resolved by the GRANT.sql.  The issue is with the creation of a text file on the file system.  Also, SQL access depends on who is logged into GP, not who is logged into the server running GP.  My application connects to SQL through it's own user, currently 'sa' to eliminate any other security issues while we find the solution.

    Thanks, Don

  • Richard Whaley Profile Picture
    Richard Whaley 25,195 on at
    RE: Custom Dictionary permissions issue

    You should find a script called GRANT.SQL in the SQL folder under MS Dynamics GP.  Run that.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans