Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Sage MAS Partner
ACI-JFS
Posts: 12
Registered: 06-03-2010
0

Customizer Button From Call

Hi,

 

I'd like to create a button on the customer maintenance screen using customizer which calls and passes the custkey to another form/screen's custid lookup. The screen will either be another built-in MAS 500 screen or a custom MAS 500 VB screen. I see code to call a screen in the forum, but not to pass a value. Thanks, in advance, for your help.

Sage MAS Partner
jmiles
Posts: 30
Registered: 12-04-2008
0

Re: Customizer Button From Call

Well, I can give you some starting points. However, my background is that of a developer, and my tips are a bit technical.

 

First, you'll need to make sure the task you're trying to launch has the ability to accept the data you're trying to send it. Often times, the task's VB class will have a DrillAround or NavigateTo method. These are used for that purpose. You could use Visual Studio's Object Browser or any other OLE or COM browser to see what's available in the task you want to launch.

 

Next, you'll need to find a way to launch the task and pass a value. This will be difficult, but not impossible, to do from Customizer. There's a thread on the forum simply called "CommandButton1", and it describes how to do this from the VB6 source code. Try as I might, I couldn't find a way to make that example work in Customizer unless you have MAS 500 source code.

 

Another option is to utilize the SOTA.ObjectManager COM class. There used to be an article entitled "How to launch a Sage MAS 500 task from any OLE client" on the old KB describing how to do this. However, that requires you to supply at least the username, password, and company ID. I happen to have a PDF of the KB article, but I don't know if I'm allowed to distribute it.

 

The last option you could explore is using the .NET Framework assemblies that come with MAS 500. They're found in the Sage MAS 500 Client\Managed Applications\Framework folder on the file system. You'll probably need the Common, Launcher, License, and Session assemblies. The Launcher class has a method called "LaunchTask", and you can pass it an XML string containing the login credentials, task ID, and context (i.e. customer ID) you want to run. There may be other threads on the forums with more information on using MAS 500's .NET capabilities.

 

I hope this helps.

Jason Miles
Technology Consultant
SGS Technology Group
http://www.sgstech.com
Sage MAS Partner
jmiles
Posts: 30
Registered: 12-04-2008
0

Re: Customizer Button From Call

I just found another thread with more information on the .NET solution. Here it is:

 

http://community.sagemas.com/t5/Customization-and-Integration/Launch-vb6-task-from-net-w-parameter/t...

 

If you go this route, you can configure your assembly for COM interop. This will let you instantiate it directly from your Customizer code.

 

Alternatively, you could set up your assembly as a standalone EXE and use WScript.Shell to call it, passing it the credentials, task, and context on the command line. In either case, you will probably need to put the assembly in the Managed Applications folder and make .config and .manifest files for it.

Jason Miles
Technology Consultant
SGS Technology Group
http://www.sgstech.com
Sage MAS Partner
ACI-JFS
Posts: 12
Registered: 06-03-2010
0

Re: Customizer Button From Call

Thanks for the info Jason.