Skip to main content

Howdy. We run Max 10 CRM Group (desktop).

What I need is to be able to create a button in my custom toolbar that is essentially:
http: //intranet/create-invoice?ID=%Client_ID%

..where %Client_ID% would represent the currently selected record's ID.

This seems like a very simple thing for the Max engineers to make possible, so I'm amazed I have been unable to find a solution.

We do have the customization kit, but that has not been any help.

Thanks!
Cory
Last edited {1}
Original Post

Replies sorted oldest to newest

Hi, Cory. Try this:

Create a little application that retrieves the current Client_Id via OLE Automation. Have it build the URL string then "run" it to launch your default browser. In VBScript it would look something like...

Option Explicit

Dim oMaxInst, oMaxRec, sCommand, oWshShell

Set oMaxInst = _
      CreateObject("Maximizer.AttachToCurrentInstance")
Set oMaxRec = oMaxInst.GetCurrentRecordObject

sCommand = "http://intranet/create-invoice?ID=" & _
      oMaxRec.GetFieldValue("IDentification")
		
'// for debugging purposes, just echo the string
Wscript.Echo sCommand

'// to open the page, use this instead
'
'Set oWshShell = CreateObject("WScript.Shell")
'oWshShell.Run sCommand, 6, False

Set oMaxRec = Nothing
Set oMaxInst = Nothing


Then add a toolbar button to launch your little application.

.

Add Reply

Post
LEGAL INFO
CONTACT US
Copyright 2007-2018 Advoco Solutions Ltd. All Rights Reserved.
×
×
×
×
Link copied to your clipboard.
×