Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Contributor
levanoff
Posts: 25
Registered: 10-30-2008
0

Contact email address in sales order entry

Does anyone know of a method using custom office to force the email address in the header section of sales order entry to default to the email address of the contact that is looked up in the "confirm to" field, rather than the default email address from customer maintenance? 

 

Many clients have multiple contacts at their customers to whom they must email sales orders.  Currently, paperless office is set to "Use email address in data entry."   This requires users to hand-enter the email address for the contact on the sales order.  Having this email field populate automatically from the contact record would be much easier.  The same applies for fax numbers.

 

If this can't be done with custom office, is anyone aware of an existing Providex enhancement that provides this functionality?

 

Thank you,

Larry Evanoff
Evanoff Business Software, Inc.
Email: larry@evanoff.com
Website: www.evanoff.com
Super Contributor
Posts: 1,462
Registered: 11-03-2008
0

Re: Contact email address in sales order entry

Larry, You can try entering the contact email address in the contact name field.  This would allow the contact email address to be in the confirm to field.  You should be able to write a script to copy the confirm to field to the email address.

Super Contributor
DFeller
Posts: 2,943
Registered: 10-28-2008
0

Re: Contact email address in sales order entry

I have been told by Sage that email addresses copy from the ship-to address, not from the contact.  I have 2 customers that wish it would bring in the email address from the contact, not from the ship-to address.

 

If your business permits it, and it works out, you can add the contact's email to the ship-to address.

 

I would suggest submitting this as an enhancement request.

 

It is possible to add a script to the S/O header panel to pull the email address from the contact and populate it into the contact email address. (This assumes that there aren't multiple contacts for the same customer with the same name.)

 

Dawn

Sage MAS 90 Customer
HOWI
Posts: 24
Registered: 06-10-2009
0

Re: Contact email address in sales order entry

I would love to see this one. I dont believe the email is pulled from ship to address... it appears that it does come out of the AR Customer Maintenance "EMail Address". I also looked at Custom office in order to add a script to the header panel and the email address definition states it is "program defined". Can this be changed or is it hard coded in the program?
Contributor
levanoff
Posts: 25
Registered: 10-30-2008
0

Re: Contact email address in sales order entry

Does anyone have the script that Dawn describes that they would be willing to share?
Larry Evanoff
Evanoff Business Software, Inc.
Email: larry@evanoff.com
Website: www.evanoff.com
Super Contributor
DFeller
Posts: 2,943
Registered: 10-28-2008
0

Re: Contact email address in sales order entry

I haven't created a script yet; just said it was possible.

 

Dawn

Sage MAS 90 Customer
hyanaga
Posts: 34
Registered: 11-16-2010
0

Re: Contact email address in sales order entry

I know this is an old post but here is the code for v4.4.  The contact key is not available, so you have to connect via ODBC.  I've used the regular SOTAMAS90 driver here and the code requires a username and password, but a silent DSN could be used too.

Dim strConnectionString, objCN
Dim oContact, sConfirmTo, sCCode, sDiv, sCustCode, sEmail
Dim company

company = MAS_SCR_CMP
user = "hollie"
pw = "hollie"

'initialize the variables
sConfirmTo = ""
sDiv = ""
sCustCode=""
sCCode = ""
sEmail = ""

'retrieve the required values from the order
retval = oBusObj.GetValue("ARDivisionNo$", sDiv)
retval = oBusObj.GetValue("CustomerNo$", sCustCode)
retval = oBusObj.GetValue("ConfirmTo$", sConfirmTo)

'connect to the MAS 90 database via ODBC
strConnectionString = "DSN=SOTAMAS90;UID="+user+"|"+company+";PWD="+pw
Set objCN = CreateObject("ADODB.Connection")
objCN.Open strConnectionString

Set objRS = CreateObject("ADODB.Recordset")
strSQLQuery = "SELECT * FROM AR_CustomerContact WHERE  ARDivisionNo = '" & sDiv _
& "' AN CustomerNo = '" & sCustCode _
& "' AND ContactName = '" & sConfirmTo & "'"

Set objRS = objCN.Execute(strSQLQuery)

Do While Not objRS.EOF
sEmail = objRS.Fields("EmailAddress")
objRS.MoveNext
Loop

if sEmail <> "" and not isnull(sEmail) then
retval = oBusObj.SetValue("EmailAddress$", sEmail)
end if

objRS.Close
objCN.close

Set objRS = nothing
Set objCN = nothing

 

Thanks!
Hollie