Securing PA52 selections.

Sort:
You are not authorized to post a reply.
Author
Messages
Jay2
Veteran Member
Posts: 84
Veteran Member
    In S3 portal I have secured the file GLNAMES so that agency users can only select from account unit within their own process level.

    Now we are using PA52 to change expense data for an employee.

    We have an action called Exp-Data that was defined in PA50 using the topic E2 - Pay Distribution.  One of the fields we have selected is Expense Acct Unit.  When an agency user uses this action in PA52 and clicks on the arrow next to this field it opens HRSC.1 and it shows all the Account Units available.  Where can I go to filter this view so they only see the account units in their own process level?
    John Henley
    Senior Member
    Posts: 3348
    Senior Member
      Are you using LAUA security or LS security?
      Thanks for using the LawsonGuru.com forums!
      John
      Jay2
      Veteran Member
      Posts: 84
      Veteran Member
        I am using LS security. I thought I would have to secure the table it is pulling from but I have already secured GLNAMES. Unless it comes from a different table.
        Christi
        New Member
        Posts: 2
        New Member
          since you are securing by process level, you may need to build the security around the DEPTCODE.DEP_ACCT_UNIT
          Jay2
          Veteran Member
          Posts: 84
          Veteran Member
            Ok, This is what I have done so far and what the issue is.

            In S3 portal I have secured the file GLNAMES so that agency users can only select from account unit within their own process level.

            Now we are using PA52 to change expense data for an employee.

            We have an action called Exp-Data that was defined in PA50 using the topic E2 - Pay Distribution (Attach1.doc 1.). Two of the fields we have selected is Expense Acct Unit and Expense Account. When an agency user uses this action in PA52 and clicks on the V next to the Expense Acct Unit, it opens HRSC.1 and it shows all the Account Units available(Attach1.doc 2.). When the user clicks the V next to Expense Account it shows all the Expense accounts (Attach1.doc 3.).

            I have added the following rule against HRSC.1 DT0 section for the Expense Acct Unit.

            if(form.PAD_ITEM_NAME=='Expense Acct Unit'&&(user.attributeContains('Agency','ALL')||user.attributeContains('Agency',subString(getDBField('GLNAMES','VAR-LEVELS',lztrim(form.PRS_COMPANY),form.VALUE),1,3))))
            'ALL_ACCESS,'
            elseif(form.PAD_ITEM_NAME!='Expense Acct Unit')
            'ALL_ACCESS,'
            else
            'NO_ACCESS,'

            The rule returns the appropriate keys (Attach1.doc 4.) and now I only see the Account units within that users own process level.(Attach1.doc 5.).

            I then added the following code to HRSC.1 DT0 section for Expense Account

            if(form.PAD_ITEM_NAME=='Expense Account'&&(user.attributeContains('Agency','ALL')||user.attributeContains('Agency',subString(getDBField('GLNAMES','VAR-LEVELS',subString(trim(form.DETAIL),1,2),subString(trim(form.DETAIL),4,8)),1,3))))
            'ALL_ACCESS,'

            The rule still returns the appropriate keys(Attach1.doc 6.) but now I get an IOS error(Attach1.doc 7.) when I click on the V next to Expense Account.

            Attachments
            You are not authorized to post a reply.