Making a Standard Field Required in Sage 100- Part 2.

Review Part 1 from last week here

Last time we discussed how to use Advanced Field Settings to make a standard field in Sage 100 required; however, this cannot be done with all fields. Notice that the required checkbox is disabled for the Tax Schedule field under AR Customer Master.

standard-field-required1a

So how can we make this field required? Starting with version 4.40, User-Defined Scripts can now be added. The following steps describe how to do this.

NOTE: Allow External Access under Company Maintenance must be checked for the company that you want user-defied scripts to run under. This option is found under the Preferences tab.

standard-field-required2a

Go to User-Defined Field and Table Maintenance. Under Accounts Receivable, right-click on AR Customer Master and select User-Defined Scripts…

standard-field-required3a

Click on the Add… button

standard-field-required4a

Select Table Pre-Write from the Event dropbox

standard-field-required5a

Type in a script name and click Yes to create the script. The following is a script that will make it so that a Tax Schedule will have to be entered on a customer record before it can be saved.

standard-field-required6a

Here is the script to make it easy to copy.

retVal = 0

SalesTaxReporting = “”

TaxSchedule = “”

retVal = oSession.GetParameter(“A/R”,”SalesTaxReporting$”,SalesTaxReporting)

if SalesTaxReporting = “Y” then

retVal = oBusObj.GetValue(“TaxSchedule$”,TaxSchedule)

if Trim(TaxSchedule)=”" then

retVal = oScript.SetError(“Entry of Tax Schedule is required.”)

end if

end if

It first checks to make sure the Sales Tax Reporting option is turned on then it checks to see if the Tax Schedule field has a value. If the Tax Schedule is blank, the user cannot save the record.

After the script is entered, click Accept, Ok, Close, Close and then Compile. This will make the script active. Finally click Close

standard-field-required7a

Open Customer Maintenance. Select a customer without a Tax Schedule (or create a new customer)

standard-field-required8a

When a change is made to the customer records (or if this is a new record), then the program will now check to see if Tax Schedule has a value when the program tries to save the record. When I click the Accept Button, I get the following message

standard-field-required9a

The program will then make me fill in the Tax Schedule before I can save the record.

If you need assistance with your Sage 100 ERP software, contact Oasis Solutions Group. Oasis provides training, service, support and custom programming for accounting, ERP, HR/Payroll and CRM software. Contact us at www.oasisky.com or 502-429-6902 for more information about how we can help your business.

Post to Twitter Tweet This Post

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!