Micro Focus Contributor
Micro Focus Contributor
498 views

Struggling to understand how to list Record Type Access Control values

I have some .NET API C# code to output to an XML file the attributes associated with Record Types. Works okay with basic attributes such as RecordTypeName, URI or RecordTypeDaysDue i.e. strings, long and boolean types. I am having trouble understanding how to get the values for more complex atttributes such as RecordTypeAccessControl. I can use a call like this to dump out the values as strings:

StringDisplayType acDisp = (StringDisplayType)System.Enum.Parse(typeof(StringDisplayType), "Export");
string acTmp = objType.GetPropertyAsString(prop.returnPID(i), acDisp, false);
Console.WriteLine($"ac:[{prop.returnName(i)}] Value:[{acTmp}]");

Which displays the following:

 

ac:[RecordTypeAccessControl] Value:[Can Use: Administrator; Can Update: <Unrestricted>; Can Modify Access: <Unrestricted>; Can Delete: <Unrestricted> ]

 

but how can I handle each of these values as separate objects so I can parse them and then output name/value pairs to my XML file.

dobbers   

0 Likes
3 Replies
EWillsey Acclaimed Contributor.
Acclaimed Contributor.

Re: Struggling to understand how to list Record Type Access Control values

Don't do this. The ACL string is for display only.  Use the other methods and properties to handle the security features.

---------
Erik
CMRamble.com
0 Likes
Micro Focus Contributor
Micro Focus Contributor

Re: Struggling to understand how to list Record Type Access Control values

Hi Erik,

Thanks for the reply. I know the ACL string is for display only hence my question on how to use the other method and properties - I don't want to set them - I only want to get their values out to an XML file.

dobbers

0 Likes
Contributor.. CousinVinnie Contributor..
Contributor..

Re: Struggling to understand how to list Record Type Access Control values

Just a thought, have you try looking into Service API and see if you could retrieve the property directly as XML from there?

Cousin Vinnie.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.