Question

How can some field in PBA control panel be marked as required? For example, your staff members create accounts using provider's control panel and it is important to have a tax zone or sales branch filled.

Answer

It can be done via customization of PBA interface:

  1. Locate the screen you need to customize, prepare a container. The steps are described in the documentation:

    http://download.pa.parallels.com/pba/5.5/doc/58297.htm

  2. Create a customization file for the screen, find <elements> part of the file, find a necessary element (details are in the documentation by link above, "Creating customization file" part)
  3. Add required="yes" attribute for needed element
  4. Make sure that you have removed all elements and their attributes that are not used in customization
  5. Restart www container to apply changes:

    /etc/init.d/www restart
    

Note, it is possible to make an optional field obligatory, but it is not possible vise versa. If a fields is marked as obligatory in the default, not customized PBA, that means that the method executed on the button click expects the argument this field passes. If an argument is not passed, the method cannot be executed.

Example

Task

Make a Sales Branch required field when creating an account from the provider's control panel.

Solution

  1. Make sure the directory /usr/local/bm/conf/wnd/BM/customization/customization is a symlink to /usr/local/bm/customization:

    # ls -ld /usr/local/bm/conf/wnd/BM/customization/customization
    /usr/local/bm/conf/wnd/BM/customization/customization -> /usr/local/bm/customization
    

    If not, configure it:

    # cd /usr/local/bm/conf/wnd/BM/customization
    # ln -s /usr/local/bm/customization customization
    
  2. Copy Account_AddCustomerWin.xml from ~bm/customization
  3. Remove the actions and the layout sections. Leave only the window ID and elements section.
  4. Leave only required element which is BranchIDBranchID, add required="yes"
  5. Eventually you should get the customization file as following:

    <window id="Account_AddCustomerWin">
     <elements>
      <input id="BranchIDBranchID" required="yes"/>
     </elements>
    </window>
    
  6. Restart www:

    /etc/init.d./www restart
    

As a result you will see an asterisk near required field:

Internal content