Tutorial : Make a field ReadOnly in Sage 300

We often get asked "How do I make a field in Sage 300 Read Only with Extender"?

You can download the AR Sample script to make the Credit Limit field read only for all users except Admin from the Resources area of the Orchid Website (Make AR Customer Credit Limit Read Only).

Save the script file.

Then in Extender Setup / View Events and Scripts, create a new entry for View ID AR0024 and attach the script to the view. (Use F6 to open Windows Explorer to upload the script into Sage 300).

 

Extender Setup for AR Credit Limit

Requirement! This functionality is available in Sage 300 Levels Customizer and Developer. The tutorials assumes Extender is installed and activated in the Sage 300 database.

Download a Sample Extender Script from the Orchid website (available to registered users only).

Tip: Use Make AR Customer Credit Limit Read Only and Save it in a Temp directory.

 

In Extender, go to Sage 300 > Setup > View Events and Scripts

Attach the script to the A/R Customer View.

Enter AR0024 as the View ID for A/R Customer.

On the Scripts Tab, insert a row and click F6 to open a browser.

Navigate to the folder where you saved the script, select the script, click

Note:

If you have already configured Extender for the A/R Customer View, a list of events and scripts configured will be displayed.

If you don't know the View ID, you can click F6 to display a list of all Extender Views active in the database.

You can use Extender / Inquiries / View Info to view additional details on the Extender Views.

Save the View Event.

 

Login as a Non Admin User.

Restart the Sage Desktop, login as a non Admin user, you will notice that the AR Customer Credit Limit field is not editable.

Important! Important: Because Extender works at the view level, this validate will apply to Imports into Sage 300 and to external programs updating Sage 300 through the Views. So if you are making a field read only that should be updated through imports or other programs, make sure those programs use credentials with appropriate rights.

 

Variation 1: Make AP Vendor credit limit read only

If you want to make the Credit Limit field on the AP Vendor screen, use Extender Inquiries / View Doc to check the AP Vendor Credit Limit field name (AMTCRLIMT).

Save the AR Credit Limit script with a new name (it is suggested to use a separate script even though it is the same field name to avoid confusion as you may want to have different user validation on A/P and A/R).

in Extender Setup / View Events and Scripts, Attach the script to view AP0015 (AP Vendor view).

 

Variation 2: Make EXTCOST read only on Sage 300 I/C Adjustment view

If you want to make a different field Read Only, for example EXTCOST in the Sage 300 I/C Adjustment view,

Open the Script in your favourite Text Editor and replace the credit limit field with the 'EXTCOST'.

Save the script file.

Then in Extender Setup / View Events and Scripts, create a new entry for View ID IC0110 and attach the script to the view. (Use F6 to open Windows Explorer to upload the script).

Note:

The script works, but note that Sage 300 I/C Adjustments expect a value in the Cost Adjustment (EXTCOST) field for Cost increase/Cost decrease script, so you probably need to adjust the script so that the field is only read only for certain adjustment types or remove some adjustment types options, depending on your requirements.

There is also a sample Extender script to default I/C Adjustment types, which might help if the extended cost validation is only for certain adjustment types. Default I/C Adjustment Type Sample Extender Script.