Sage 100 Scripting Classes: Save the Dates


Save the dates for these two upcoming Sage 100 scripting classes by Alnoor Cassim of xkzero!

  • Basics of Scripting for Sage 100
    2-day class, April 7 and 8
  • Intermediate Scripting for Sage 100
    2-day class, July 23 and 24 (pre-Sage Summit 2016 training)

Early bird alert!
Register for the intermediate class by April 30 to save $300. 
By popular demand, we extended this offer from the original March 1 date.

Email us now to save your spot (and a few hundred bucks)! 

Classes will be held at xkzero’s office, a 10-minute drive from Chicago’s O’Hare International Airport. For your convenience, the Intermediate class is being offered the two days immediately prior to the start of Sage Summit 2016 in Chicago.

Learn from Alnoor Cassim, one of the masters of customizing Sage 100 using Alnoor-LinkedInImageVB scripting. You won’t want to miss these classes.

The cost for each Sage 100 scripting class is $1,199.

Early bird price for Intermediate Scripting class registrations received by April 30, 2016 is $899.

Course registration fees include:

  • 2-day course attendance
  • 40+ page course curriculum
  • 75+ actual scripts of real-life projects
  • Continental breakfast, plus lunch (both days)

Email Santos Rodriguez now at to save your spot!
Space is limited, so contact us right away, and you will be placed into the queue in the order requests are received. A formal invitation with links for official registration and details on payment remittance will follow.

Don’t delay registration. Prior versions of these classes have sold out quickly.

We hope to see you at one or both of Alnoor’s scripting classes!

About Basics of Scripting for Sage 100 Class

The basic level Sage 100 scripting class will be a 2-day, fairly intense on-premise instructor-led classroom training at xkzero’s Chicago training facility. On Day 1, from the morning through lunchtime, Alnoor will lead a review and discussion of scripting concepts, and provide an overview of Sage 100 business objects, and an explanation of the ways Custom Office plays a major role in User-Defined Scripting. After lunch on Day 1, and all of Day 2, participants will have a heavy hands-on experience, with the vast majority of time spent working on labs and activities based on real-life Sage 100 scripting projects. Take-home materials included with the course: 40+ page curriculum, scripting reference guide, and 60+ actual scripts from real-life projects.

About Intermediate Scripting for Sage 100 Class

The intermediate-level Sage 100 scripting class will be a 2-day intense on-premise instructor-led classroom training at xzkero’s Chicago training facility. We have scheduled this class to accommodate those attending Sage Summit 2016 in Chicago, which begins July 25. This is a follow-up class that continues where the basics-level lessons left off. We will emphasize advanced concepts and user-interface (UI) scripts. It is designed for those who have been designing scripts for clients or for their own company projects, and now want to take scripting to the next level. Like the basics class, the majority of time will be spent working on labs and activities. Take-home materials included with the course: 40+ page curriculum, scripting reference guide, and 75+ actual scripts from real-life projects.

Prerequisite: Attendance of the Sage 100 Basics of Scripting course or permission from the instructor.

Early bird alert! Register for Intermediate Scripting by April 30 to save $300. Email us now to save your spot! 





Sage Summit 2015: Early Bird Registration Rates Extended to 5/15!


We are looking forward to what is sure to be another exciting Sage Summit! This year’s conference takes place July 27-30 in New Orleans, Louisiana at the Ernest N. Morial Convention Center.

Did you know Sage customers can take advantage of an early registration price of $399? This rate is in effect until April 30, 2015 has been extended through May 15!


Note that on the registration page, you’ll find tabs for hotel packages
and airfare discounts.

What is Sage Summit?

In case you are new to this annual event, we’ll give you the run-down. Sage Summit is a four-day convergence of Sage partners and customers, packed with training sessions, and informative presentations on topics relating to ERP solutions, technology, and specific industry sectors. It includes a showroom floor to enhance the networking opportunities and give customers a chance to explore new technologies.

Sage Summit keeps it high profile, too. Last year’s speakers included Magic Johnson, Biz Stone of Twitter, and Jessica Alba.

xkzero Representation

Sage also calls on those with the pulse on issues affecting the Sage community, including our own Paul Ziliak, co-founder of xkzero. He emphasized the significance of mobile ERP in this presentation: Why Mobile, Why Now?. Turns out people enjoyed it so much that Paul was invited to speak again this year. Stay tuned for details!

As always, we will have a presence on the showroom floor, where we look forward to connecting with present and future partners and customers. We welcome you to stop by for a demo of our mobile apps such as xkzero Mobile Commerce, iSales 100, and GetX, all of which integrate with Sage ERP solutions.

It’s been an exciting time for xkzero, as we have grown a bit since Sage Summit 2014. We bring new offerings such as xkzero Technical Services, and have expanded our channel sales territories. These changes have also led to additional staff who some of you might know from their years of success in the Sage community. Be sure to visit our booth to greet our whole team!

Sage Summit 2015 Sneak Peek

We don’t have all the sought-after details about special guests or closing night celebrations, but Sage has provided the following calendar information so you can start plotting your Summit story now!:

This just in! Sage announced that Paul Ziliak will speak in the thought leader series again. He will present these two talks:
TL-134: Why mobile, why now? A decision maker’s guide to business success
TL-139: Disrupt your industry: Making your mobile dream a reality


The inspirational energy at Sage Summit can be quite contagious. We hope to see you in New Orleans!


At xkzero, we believe that people perform best when they are confident, informed, and have a high level of trust in the tools they use. Maybe it’s time for your wholesale distribution business to start gearing up with mobile apps. If your ERP data tells the story of your customers and your inventory, shouldn’t you equip your team to have that information in their pockets?

Contact us at or 847-416-2009, we can help you create a mobile plan that works for you.

How to Use Scripting to Require Additional Fields on a Screen 

Scripting Tips for Sage 100 ERP
by Alnoor  Cassim, xkzero Technical Services


One of the unique features of Sage 100 ERP is the ability to set up business rules, similar to a built-in requirement such as entering a salesperson code to add a new customer within Customer Maintenance.

An example of a customized business rule is not allowing a customer to be created until the Price Level and Email Address fields are filled in. Also, you may put rules in place to temporarily place the customer on credit hold and apply a $1 credit limit until the credit hold is cleared by the finance department.

Or, perhaps you have not taken advantage of the customization options in Sage 100 ERP, and have an imprecise, manual process in place that relies on all users to follow and remember these rules. You may have even defined tasks and security events in Role Maintenance to accomplish a portion of the automation, then thought, “I wish there were a clean way to enforce all these rules!” In fact, there is a way! Once again (like we showed you in the previous blog), scripting can save the day! The answer to your frustrations could be creating a fairly straightforward script.

How to Use Scripting to Require Additional Fields on a Screen

What  kind of script  do you need to create?  

Create an event script (a.k.a. User Defined Script) that runs in Customer Maintenance when the Accept button is pressed.

Note that you are not limited to requiring only the fields mentioned above. You are also not limited to Customer Maintenance. The event type you will create is called Table Pre-Write. All of the “Pre” events (Pre-Write, Pre-Validate, Pre-Delete) are typically used to add your own user defined validation and prevent an action from occurring.

How  do  you create this script?  

Follow  these  steps:

1. Go to the Custom Office/Main Menu.
Make these selections:
“User-Defined Field”
“Table Maintenance”

2. Go to the  “Accounts Receivable”  heading.
Choose:  “AR Customer Master.”
Right-click and choose:  “User Defined Scripts.”

3. You are now in  the  “User Defined Script”  window.
Click:  “Add”

4. This will open the “User-Defined Script – Add Script”  window. (See image below.)
Choose:  Event: “Table – Pre-Write”
Type a name for your script, such as this:  “Required Fields for New Customer”


5. This will bring you to a  message  indicating that  the script file does not  exist.
It will be followed by a question, “Do you want to create it? Yes/No?”
Yes, you do want to create the script! 
Click:  “Yes.”

6. Now the “Edit Script” window will appear.
Copy the following code and paste it into your script editor window:
NOTE: It is important to use the code exactly as shown below, including line breaks and spaces.

'Alnoor Cassim - xkzero - Require Additional Fields in Customer Maintenance

'Init VARs
sEmailAddress = "" : sPriceLevel = "" : sCustomerNo = "" : nCreditLimit = 1

'Check if current user is member of the Finance_Dept role.
In_Finance = oSession.AsObject(oSession.Security).IsMember("Finance_Dept")

'Enforce new customer rules for any non-Finance_Dept roles (In_Finance = 0)
'If we wanted to run only for Finance_Dept check for In_Finance > 0

If In_Finance = 0 and oBusObj.EditState = 2 Then

	retVal = oBusObj.GetValue("EmailAddress$", sEmailAddress)
	retVal = oBusObj.GetValue("PriceLevel$", sPriceLevel)
	retVal = oBusObj.GetValue("CustomerNo$", sCustomerNo)

	If sPriceLevel = "" Then

	sMsg =	"The Price Level is blank." & vbCrLf & _
		"Please enter a Price Level for customer " & sCustomerNo
	'retVal = oSession.WriteLog ("M", Replace(sMsg,vbCrLf,CHR(138))'Write to Activity Log
	retVal = oScript.SetError(sMsg) 'Prevent the Accept and show the message
	retVal = oScript.InvokeButton("fldr.pAddl") 'Click the Additional tab folder
	Exit Sub

	End If

	If sEmailAddress = "" Then

	sMsg =	"The Email Address is blank." & vbCrLf & _
		"Please enter an Email Address for customer " & sCustomerNo
	'retVal = oSession.WriteLog ("M", Replace(sMsg,vbCrLf,CHR(138)) 'Write to Activity Log
	retVal = oScript.SetError(sMsg) 'Prevent the Accept and show the message
	retVal = oScript.InvokeButton("fldr.pMain") 'Click the Main tab folder

	Exit Sub

	End If

	'Put the Customer on Credit Hold and set the Credit Limit = $1.
	'This will overwrite whatever was previously entered for these 2 fields.
	retVal = oBusObj.SetValue("CreditHold$", "Y")
	retVal = oBusObj.SetValue("CreditLimit", nCreditLimit)

End If

How does this work? 

To better understand the logic behind the script’s functionality, read this:
“Init VARs”
In the first section, we “initialize” (init) the variables to prepare for use later in the script.

Through these stated conditions, we run our main logic. In this particular script, we want the conditions to be as follows:

Check if we’re a member of the role called “Finance_Dept.”

Check if the customer on the screen is a “new customer.”

How  do we find out if the current user is a member of “Finance_Dept” role?  

Use the special IsMember() security function you see in the code block. If the value to the left of the equals sign is more than 0 the current user is a member of that role. Otherwise, they are not a member.

How  do we find out if the customer is new or existing?

We do this  by checking the  “edit state” as indicated by the  following  values:

2 = new customer
1 = existing customer
0 = no customer on the screen

Get the values of the Price Level, Email Address, and Customer No fields.
If either of the first 2 fields are blank, take these steps to prevent the customer from being saved:

  1. Check for a blank price level.
    Notice the If / End If block to check for a blank Price Level.
    Execute the SetError(msg) function.
    This is a 2-part function that will both prevent the Accept button from being clicked and show a message box to the user with your own user defined message. A good message could be this, “Oops! The Price Level is blank.”
  2. Auto-click the Additional tab folder.
    Run the InvokeButton() function as a way of auto-clicking the Additional tab folder.
  3. Exit the script.
    To immediately exit the script, run the Exit Sub command This is not required for preventing the Accept.
  4. Check for a blank email address.
    To check for a blank email address, the If / End If block runs similarly, except the Main tab is auto-clicked.
  5. Write message to the Activity Log.
    Do you want to write the message to the Activity Log? Then remove the single quote character from the line where you see the WriteLog() function.
  6. Put the customer on Credit Hold and set the Credit Limit.
    Next, Put the Customer on Credit Hold and set the Credit Limit = $1
    The two SetValue() lines at the end accomplish these tasks.
    Note: You should not follow this up with a Write() command because the Pre-Write script runs before the standard Sage 100 Write() command runs, which will write / save the record for us. If we ran on Post-Write event then we would issue a Write().

    You’re  almost  done!   

  7. Accept the script.
    Now you can “Accept” the script.

    This will return you to the “Add Script” window.
  8. Return to the User Defined Scripts window.
    Close this screen and return to the “User Defined Scripts” window.
    To do so, click:  “OK.”
  9. Go to the Script Compile window.
    Next, go back to the main “User Defined Field” and “Table Maintenance” window.
    To do so, click:  “Close.”Here, you must also click “Close” again to see the “Script Compile” window.
    IMPORTANT:  When the “Script Compile” window appears, click the Compile” button.
    You can further edit the script, if necessary.  To do so, from the “Custom Office/Main” menu, choose the “User Defined Script Maintenance” task. When done editing the script, to syntax check the script, click “Check Script,” then to save the script, click “Accept.”
  10. Compile. Close.
    The next step is to click the “Compile” button in the lower-left of the screen. When the Script Compile window appears, click the Compile button again followed by the Close button.
    You’re done!

This is the second of many scripting examples we will share through the xkzero blog. If you need help with scripting, programming or technical issues with your Sage ERP, no matter how complex, please feel free to contact us: 

xkzero Technical Services
Call: 847-416-2009


Use Scripting to Change All Shipping Warehouses on an Order

Scripting Tips for Sage 100 ERP

Blogger: Alnoor Cassim, xkzero Technical Services

When creating Sales Order Entries in Sage 100 ERP, have you ever keyed in many lines of shipping information on multiple orders only to learn that the product needs to ship from a different warehouse than the location originally entered?

If so, you know that manually correcting the warehouse code on each order line is quite time consuming (and not exactly fun). You may have even thought, “If only there were a way to change the warehouse information just once to apply the update to all the line warehouses… Good news! This wish can come true by creating a fairly straightforward script.

What kind of script do you need to create to change all warehouses in an order?

Create an event script that runs when the Warehouse Code on the Header is changed.

How do you create this script?

Follow these steps:

  1. Go to the Custom Office/Main Menu, and make these selections:
    “User-Defined Field”
    “Table Maintenance”
  2. Under the “Sales Order” heading, choose “SO Sales Order Header.”
  3. Right-click and choose “User Defined Scripts.”
  4. In the “User Defined Script” window, click the “Add” button. This will open the “Add Script” window.
  5. In the “User-Defined Script – Add Script” window, as shown below, make these choices:
    Event: “Column Post-Validate”
    Field: “WarehouseCode”
  6. Type in a name for your script, such as this:
    “Update Line Whse from Hdr Whse”
  7. You will see a message indicating that the script file does not exist, followed by a question, “Do you want to create it? Yes/No?”
    Yes, you do want to create the script! Click “Yes.”
  8. Now the “Edit Script” window will appear. Copy the following code and paste it into your script editor window. Note: It is important to use the code exactly as shown below, including line breaks and spaces.
'Init VARs 
newWhse = value : sItemCode = "" : sItemType = "" 

'If an existing sales order and not during update 
If oBusObj.EditState = 1 and oSession.Updating = 0 Then 
	Set oLines = oBusObj.AsObject(oBusObj.Lines) 
	retVal = oLines.MoveFirst() 
	sMsg = "Would you like to update the Whse Lines to Whse Code " & newWhse & "?" 
	retMsg = oSession.AsObject(oSession.UI).MessageBox("",sMsg,"Style=YesNo") 
	If retMsg = "NO" Then 
		Exit Sub ' 
		retVal = oLines.MoveFirst() 
		'Loop through all the lines and choose regular inventory item lines only 
		Do Until CBool(oLines.EOF) 
			retVal = oLines.GetValue("ItemCode$", sItemCode) 
			retVal = oLines.GetValue("ItemType$", sItemType) 
			If sItemType = "1" Then 
				retVal = oLines.SetValue("WarehouseCode$", newWhse) 
				retVal = oLines.Write() 
			End If 
			retVal = oLines.MoveNext() 
	End If 
End If

How does this work?

To better understand the logic behind the script’s functionality, read this:

“Init VARs”
In the first section, we “initialize” (init) the variables to prepare for
use later in the script.

Through these stated conditions, we run our main logic. In this particular script, we want one of the conditions to be “existing order.”

How do we find out if the order exists?

We do this by checking the “edit state” as indicated by the following values:

2 = new order
1 = existing order
0 = no order on the screen

Next, to find out if you have landed on a regular inventory item, follow these steps:

  1. Go to the Lines object. Move to the first line and start a loop.
  2. Check the value of the “Item Type” field.
  3. If it is a regular inventory item, set it with the new value and then write the line. Continue until all the lines are completed.

You’re almost done! 

Now you can accept the script. This will return you to the “Add Script” window.

  1. To close this screen and return to the “User Defined Scripts” window, click “OK.”
  2. Next, to go back to the main “User Defined Field” and “Table Maintenance” window, click “Close.” Here, you must also click “Close” again to see the “Script Compile” window.
  3. IMPORTANT: When the “Script Compile” window appears, click the Compile” button.

Note that you can further edit the script, if necessary. To do so, from the “Custom Office/Main” menu, choose the “User Defined Script Maintenance” task.

This is the first of many scripting examples that we will share through the xkzero blog. If you need help with scripting or other technical issues with your Sage ERP, no matter how complex, please feel free to contact us: 

xkzero Technical Services
Call: 847-416-2009

Optimizing Sage 100 ERP with xkzero Technical Services

by Alnoor Cassim


Some of you may only think of xkzero as the people behind the cool iSales mobile app or the creators of GetX, the mind blowing search application for Sage 100 ERP. Actually, our capabilities and talents extend way beyond these better known areas of expertise. Yes, we have a core focus of getting customers mobile, but that’s only one of the many ways xkzero helps Sage partners and customers translate their business visions into Sage 100 ERP solutions.  xkzero

As the new director of xkzero Technical Services, it is my goal to make sure you are aware of our capabilities. I’ll be using the xkzero Digest and blog over time as a forum to illustrate how we can help you. To start, here’s a list of our offerings:

  • Sage 100 ERP enhancements (ProvideX custom modifications)
  • Custom Office scripting to enhance and extend Sage 100 ERP capabilities
  • Training: Custom Office scripting (2-day intensive class)
  • Training: Connecting external apps and scripts to Sage 100 ERP using the Business Object Interface (BOI)
  • Instruction: Sage 100 ERP Premium (SQL) (classes)
  • SQL projects and services:
    • Stored procedures and views
    • SSIS/DTS packages
    • Replication and mirroring
    • Reporting through SQL Server Reporting Services (SSRS)
  • iOS (Apple mobile) custom apps for Sage 100 ERP
  • Advanced Crystal Reports
  • Perform Logic to enhance and extend Visual Integrator capabilities
  • Troubleshooting and debugging services:
    • Advanced technical support: Sage 100 ERP errors and issues
    • Advanced technical support: Sage 100 ERP Premium (SQL)
    • Troubleshooting and diagnostics: network and operating system issues, working with IT teams
  • Sage 100 ERP custom integrations with WMS systems, CRM systems, HRMS systems, and other applications:
    • BOI
    • SData
    • ProvideX
    • xkzero Web Services
  • eBusiness Manager expanded services
  • .NET applications and ASP web development

Please keep an eye out for invitations to upcoming events that will showcase our capabilities. We welcome your partnership, and we hope you’ll consider making xkzero Technical Services part of your solutions arsenal for Sage 100 ERP.

Contact us at or 847-416-2009.


Introducing xkzero Digest



Today, we launch the xkzero Digest, a periodic electronic publication designed to keep you informed of industry topics, technical updates and product and event announcements related to mobile technology for Sage ERP systems. In addition, we’ll write about custom development-related subjects, and provide information that helps inspire you to apply the best technology, at the right time, for you and your clients.

Focus: What You Want to Know

While we already have many topics and articles we’re excited to share with you, we also invite you to let us know about subjects of interest to ensure that we continue to focus on things that matter most to you.

We’re at a Technology Crossroads

As we embark on 2015, the world of ERP and accounting software systems is without a doubt at a crossroads. The world of business management systems into which many of us

Team xkzero is focused and ready!

Team xkzero is focused and ready!

entered 20 or 30 years ago—where a single consultant would sell and install the system, perhaps even set up the server as well as conduct the set-up and training—becomes more of a faint memory with each passing year.

Conversely, in today’s specialized business world, those who create the most value concentrate on a particular specialty. At xkzero, we have that kind of clear focus—it’s all about mobile ERP—and it’s our wish that this dedication benefits each and every one of you.

Pushing Boundaries and Yielding Rewards

These days, the businesses that push boundaries with technology reap the greatest rewards. Whether your clients use Sage ERP X3, Sage 100 ERP and/or Sage 500 ERP, we think xkzero can help you create new revenue streams, not to mention customer satisfaction and loyalty.

xkzero Digest Content

Our first issue of xkzero Digest introduces our new director of technical services, Alnoor Cassim, and also includes a guide to help you install and set up GetX Search so you can win more new customers and delight existing ones.

All the best for a great 2015!




Alnoor Cassim to Lead Sage 100 ERP Scripting Class at 90 Minds Conference

90 Minds 2014

The 90 Minds Consulting Group annual conference in San Diego is fast approaching. Scheduled from Thursday evening February 19 through Saturday February 21, the Meeting of the Minds 2015 conference is a members-only gathering for this group of highly experienced Sage 100 ERP consultants.

This year’s conference will kick off with a two-day (Wednesday 2/18 and Thursday and 2/19) Basic Scripting class taught by xkzero Director of Technical Services, Alnoor Cassim.

The 90 Minds Consulting group is a group of independent ERP consultants located across North America focused primarily on Sage 100 ERP (formerly MAS 90/MAS 200).

The group meets daily via online private messaging to brainstorm and collaborate on more difficult client issues. The 90 Minds conference is open to members only. Find more about membership and its benefits here.



xkzero Hires New Director for Sage 100 ERP Technical Services

Chicago, IL (December 3, 2014)—

Chicago-based software developer xkzero today announced the hiring of Alnoor Cassim as director of technical services. Cassim will serve a leadership role in xkzero Technical Services, a new initiative that provides technical services, custom software development and advanced system support for Sage 100 ERP business partners and end user customers.

Alnoor-LinkedInImage“Alnoor has an unparalleled reputation throughout the Sage community to solve complex business and technology problems,” said Paul Ziliak, xkzero co-founder.

“Beyond his high level technical acumen, Alnoor is known for his professionalism and an incredibly generous nature when working with other Sage business partners. His leadership will help companies grow by maximizing their business systems capabilities using the most advanced technologies in our industry,” said Ziliak.

Cassim will direct an experienced and growing team offering solutions and services to the Sage VAR/business partner community and end user companies. Offerings will include custom ProvideX programming, custom mobile ERP development, diagnosis, scripting, BOI, SQL programming, and system integrations with SData and xkzero Web Services, .NET and ASP web development.

“I’ve had my eye on xkzero for the last several years. I am passionate about growing businesses, identifying and creating solutions to streamline processes, improve productivity, and increase profitability. Few other companies have invested like xkzero has in the development of new technologies such as mobile, web services and universal search,” Cassim said.

Cassim said, “Having these leading edge tools along with traditional resolute services like .NET, scripting, SQL development, integrations, and hardware will unquestionably help grow Sage business partners and their customers. I’m definitely looking forward to this and very excited!”

Cassim spent nearly 15 years as Senior Customer Support Engineer for Sage North America, specializing in the Sage 100 ERP product. As a sole proprietor since 2009, Cassim has also been an integral part of the 90 Minds Consulting Group, a nationwide collective of primarily Sage 100 ERP (formerly MAS 90/200) consultants. Beyond consulting and development, he has provided classroom and webinar training on scripting, Crystal Reports, SQL Server, and advanced technical support techniques.

About xkzero:
xkzero is a mobile app developer and provides advanced technical services, programming, development, support and consulting services to other Sage Partners and resellers for Sage 100 ERP, Sage ERP X3 and Sage 500 ERP. xkzero has a long history of working well with other Sage Resellers providing outsource services to supplement their current team. xkzero’s applications include iSales 100, xkzero Mobile Commerce, GetX Search for Sage 100 ERP, and EBM 100. xkzero delivers technology solutions that are easy to deploy and have a powerfully positive impact on the bottom line of small and mid-sized businesses.