Hi,
Problem: I need to make a form such that it becomes read-only once it's offline.
i.e. everyone can open in Infopath and print, but not change or save locally. Only a select group would be able to open/edit save.
So it clearly states on ( https://msdn.microsoft.com/en-us/library/office/aa944110.aspx ) that Browser-compatible form templates do not support IRM.
But, I'm tantalized by the code template, which says:
// Member variables are not supported in browser-enabled forms.
// Instead, write and read these values from the FormState
// dictionary using code such as the following:
//
// private object _memberVariable
// {
// get
// {
// return FormState["_memberVariable"];
// }
// set
// {
// FormState["_memberVariable"] = value;
// }
// }
Does this mean I can technically do IRM with the UserPermissionCollection Class? I'd need a code example on how to do this from the FormState, if it's possible.
something like the example at the bottom of that website that I've mashed in here with obviously incorrect syntax:
set{
FormState["_Permission.UserPermissions.Add("someone@example.com", _
PermissionType.Change, dtExpirationDate)"];
}
Using Infopath 2013 designer ; the code editor opens in Visual Studio 2012, (Microsoft Visual C# 2012)
Thank you.