Pages

Thursday, November 26, 2015

Set default value through relationship

Goal: Populate the storeroom in Work order actuals (Materials section) from the person's default storeroom.



Solution:
  1. Create a relationship from MATUSETRANS to MAXUSER.
    • Relationship: LOGGEDIN_USER
    • Child Object: MAXUSER
    • Where Clause: :&PERSONID& = personid

  2. Give the default value for STORELOC attribute as ':LOGGEDIN_USER.DEFSTOREROOM'

  3. Save the record.
  4. Run the database configuration from select action in the list view of 'Database Configuration' application.
    Note: This change don't require admin mode as it is a not structural change.
Apply Configuration Changes from Select Action

Start Configuring the Database

Database configuration is complete.
Testing:

  1. Click on Profile on the top right corner. Select Default Information option, enter the default storeroom value in "Default Storeroom for Self-Service Requisitions" field.
    Note: The User should have access to issue items from the given Storeroom.
     
  2. Create a Work order and approve it. Go to Actuals tab, in the Materials section click on New row. The default storeroom given in the profile will be populated.

No comments:

Post a Comment