The following works perfects in developer, but 30 minutes before a demo for the senior sales staff I found the exact same search does not work in client…
It’s supposed to gather all the email addresses from the email field of a foundset, check for syntax, concatenate them separated by a semi-colon, and put them in the bcc field in Outlook.
Works perfectly in Developer… [which I demo’ed it in ] in client it opens up a Firefox tab for each email - right of the @ symbol, using everything left of the at symbol for a potential password for the site…!
//put all email addresses in a one column separated by '; ’ check for ‘www’ and ‘see notepad’ and missing ‘@’
var x = databaseManager.getFoundSetDataProviderAsArray(foundset, ‘cemail’);
var maxReturnedRows = 10000;var y = ‘’; //initialize a string variable
for (i = 0; i < x.length; i++) {var inputValue = utils.stringTrim(x*)*
if(x == “” || utils.stringPatternCount(x*,“,”) == 0*
_ && utils.stringPatternCount(x*,“@”) == 1*__ && utils.stringPatternCount(x*,“www”) == 0*
&& utils.stringPatternCount(x*,“.”) >= 1*
* )
{
y = utils.stringTrim(y) + '; ’ + x;
} else {
var question = plugins.dialogs.showInputDialog(‘EMAIL FORMAT ERROR’, ‘The email address ’ + inputValue + ‘ does not appear to be correct!’, inputValue);
var query2 = “SELECT ccustno FROM arcust WHERE cemail ='” + inputValue + "’ "
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(),query2,null, maxReturnedRows);
globals.emailTrigger = 1*_
* forms.VAM_Customers.controller.showRecords(dataset)
forms.tab_address_mailing_VAM_arcust.elements.cemail.readOnly = false*
* forms.tab_address_mailing_VAM_arcust.elements.cemail.requestFocus()** controller.saveData()*
* return;*
* }*
}
application.setClipboardContent(y);
application.showURL(‘mailto: ?bcc=’ + y)
[/quote]
Any ideas?