05-20-2010 03:39 AM
I have a problem. I prepared plug-in to integrate other application data wit ACT! in both direction. When current user has no rights to see specific company my system try to add this company from other application to ACT! second time. I can’t set information about integration in other application. Is there any way to know if specific company (by name) exist in system even if current user cant’t see it? I use method actApp.ActFramework.Companies.GetCompanies(null); to get all companies.
05-20-2010 10:29 AM
Your ActApplication will be bound to the user permissions for the currently logged in user, OLE also respects current users security role.
The only thing I can think of is a separate application that logs into the framework as a different user and passes back in the collection of all companies to check for duplicates.
05-25-2010 02:58 PM
Matt is correct - any access means into ACT! via the SDK will honor the security imposed by the logged in credentials. Just a clarification to Matt's post - you don't necessarily need a separate application but you do need a second handle to the database using the elevated credentials for your code.
Check out the OLEDB examples in devnet downloads board - in your code you can spool up another DB handle there and query the DB as a user with admin access with very similar code as in the examples. Make sure to keep your 2 DB handles separate and to close both of them in your code!.