Smart Note

Building an LDAP Infoset in Lawson Smart Notes

There is quite a bit of value in bringing your Lawson S3 LDAP or other LDAP data into Smart Notes. Once it’s in an infoset, you can use the data in other Smart Notes for bursting, delivery, etc. We actually use it as an auditing tool for security changes. We build infosets on the Lawson security data and check for new keys each day. This assures the auditors that any changes we make are through the established change control process. Building an LDAP infoset is actually quite simple, but maddeningly hard if you don’t know some of the specifics. Gary Garner from Lawson was the one who originally showed me how to do it. The examples below are of a simple infoset that we use for bursting.

First create a new infoset with an LDAP source as the below image shows.
SNLDAPConnection

  • The user id and password should be for a user that has the ability to query the LDAP directly and is not an ID set up in the Lawson Security Admin tool (although it might be).
  • Provider URL is the URL to your LDAP with the port number. I believe the standard port is 389. Your LDAP administrator should be able to provide this.
  • Enter the Context Factory exactly as you see it here.
  • See below for Search Base.
  • Unless you are familiar with LDAP searches, you’ll probably want to leave the Query string as I have it here. There are several good web resources for LDAP search if you’re not getting the results you want.

Keep in mind that the Lawson LDAP was designed by someone who either never wanted anyone to be able to use it or they didn’t actually know how LDAP works. I’m sure they had a reason for designing they way they did, and I’m pretty sure it’s a bad reason. But I digress…

The Search base follows the LDAP search standards. The full path can be determined by using a tool like JXPlorer. Note that the path is in reverse order from the way you descend the tree.
JXplorerPath

After you click next, you will need to add the field mappings. I would recommend that you do NOT allow SN to auto create the fields. The source name (highlighted) should correspond to the attribute name you see in JXPlorer. Once upon a time when dealing with an LDAP source, if the name didn’t match the source name it caused issues. We continue to do that and I can’t comment as to whether it has been fixed. In this case, we’re bringing in the user’s RMID (cn), Full Name and Email.
SNFieldDefinition

Here’s a screen shot of the Attributes in JXPlorer.
(For those who are wondering – yes the first four entries here correspond to the Query string in the first screen shot.)
JXplorerAttributes

If you want to be able to query the data set using a SQL tool, Crystal reports, etc you should check the box indicating that it’s a large infoset when you save it. This will create a table called INFOSET_NNNN in the LawsonSN database where NNNN is the id of the infoset. The fields in the table for this example will be COLUMN0 (id), COLUMN1 (name), COLUMN2 (email).

HTH

Advertisements

LBI: Smart Notification queries

Have you ever worked in Smart Notes and just HATED life? This happens to me quite a bit, but mostly because the stupid User Picker is in no particular order. Another pain point is that I can’t see everything that another user is subscribed to. Here’s how I deal with it…

How to figure out what a user is subscribed to and lessen the pain of finding the user in User Picker.

--Get list of subscribed items for user 
SELECT ACS.ACCESSID as Userid, ENTRYSTRING as SN_Name, ENTRYDESC as Description
FROM ENPBATREE TREE 
INNER JOIN ENPENTRYACCESS ACS 
ON TREE.TREEENTRYID = ACS.TREEENTRYID 
WHERE ACS.ACCESSID IN ( 
  SELECT USERID 
  FROM ENPUSERMAP 
  WHERE USERNAME = 'jdoe') 

The result looks something like:

SN_Name Description
FIN_PeriodClosed Period Closed for company
FIN_Accounting Unit Changes Accounting Unit Changes
--Get list of groups for user 
SELECT U.USERNAME as GROUP
FROM ENPUSERMAP U 
INNER JOIN ENPGROUPMAP G 
ON U.USERID = G.GROUPID 
WHERE G.USERID IN ( 
  SELECT USERID 
  FROM ENPUSERMAP 
  WHERE USERNAME = 'jdoe') 

The result is something like this:
GROUP
Finance
SUPERLUSER
LBI AP

If your organization is anything like mine, with several hundred groups, at least you can use the IE “find” function to quickly find your group. With 50 per page, it isn’t so awful…

(Note: While I recognize that EFS/ERS has a “Manage User” screen, this is of limited help sometimes in SN. As of 9.0.3.1, Smart Notes synchronizes independently of EFS. Unfortunately, SN syncs the ENTIRE LDAP into the tables, regardless of what EFS has. We have EFS set to only sync a group called LBIUSER where we add all LBI users. We only have about 3000 users in this group so the sync is several minutes, but not unwieldy. Smart Notes synchronization on the other hand, takes over two hours on a good day. If we run it during busy periods it can bring down the system. Therefore we only sync once a week. Hence why I need to figure out SN groups separately.)

HTH