I have created new user 'testUser' in Dynamics GP company lets say 'TWO', there is another database on same server which is a non GP company database lets say 'TEST'. There are few tables in TEST db which I need to read on my some Dynamics GP form. I have created a view in database 'TWO' to read records from this table.
create view TestView
as
select description from TEST..table1
GO
But when accessing this view in GP form I am getting permission error for my user testUser. I went to SQL server and mark database 'TEST' for user testUser. After that I get select permission message on view TestView. after running
grant select, insert, update, delete on TestView to testUser.
I got no more issues. But is there any query by using which I will give permission to users whenever new user will be created in Dynamics GP?