Hi all,
I am developing a infopath form in which i have added a custom
toolbar , now i want to add functionality to enable or
disable button in toolbar based on role defined in Tool-->User
roles menu.
I tried doing this through VS.NET toolkit for infopath.
and first registered the form template through regform
utility and trying to disable the button in custom toolbar
using Microsot Office core library as a reference.
but still it is giving security related exception as
System.Security.SecurityException
That assembly does not allow partially trusted callers.
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at InfoPathProject2828.InfoPathProject2828.OnLoad(DocReturnEvent e)
at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnLoad(DocReturnEvent pEvent)
please help me out and suggest if their are any other method for disabling or enabling of custom tool bar buttons based on user roles.