This topic is locked

Examples for vesion 9.7 features?

3/10/2017 3:24:46 PM
ASPRunner.NET General questions
A
Arkie author

Some of the version 9.7 features look very appealing, but I don't see how and/or where they can be implemented. Have I missed something??
~Joe

jadachDevClub member 3/10/2017

I agree. I would love to see good examples of using all the new APIs.

Pete K 3/15/2017



Some of the version 9.7 features look very appealing, but I don't see how and/or where they can be implemented. Have I missed something??

~Joe


So far the only ones I have tried out are embedded code in a dashboard and grid click actions. I have already used the latter a couple of times. Very handy.

jadachDevClub member 3/15/2017

I am very interested in learning more about leveraging the security API. I can't seem to figure out how to use it in any practical way.

Pete K 3/16/2017

Agreed. Here is one application in which I have used it. [size="2"]This is a small thing, but I was able to fix a nagging issue with AD single sign-on. [/size]
The display name by default seems to be the 'cn' from LDAP, which displays as [LastName], [FirstName]. I had an app where they wanted it displayed in alternate formats. Since we have a SQL table that contains additional user profile information that is keyed to the user's network login ID, it's a simple matter to add some code to the After Successful Login event to look up the info and assign it to session variables. The only problem was that I couldn't figure out how to get the user menu that ASPR.net generates to display the name the way I wanted it. U[size="2"]ntil I [/size]discovered[size="2"] the [/size]setDisplayName() method in the API. You can set that to whatever you like and that sets the display name everywhere:



string strDisplayName = data["Prefix"] + " " + data["FirstName"] + " " + data["LastName"] + " " + [size=2] data["Suffix"];

Security.setDisplayName(strDisplayName);


The documentation incorrectly states that this method accept no arguments, but it was easy enough to figure that out.
Next I want to experiment with setting owner id dynamically as I have situations where I want to assign ownership of records based on more complex criteria than a simple user name field.