Plugin to validate more than 2 email addresses  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Plugin to validate more than 2 email addresses

Postby Ernst » Fri May 10, 2019 4:08 pm

JIWA seems unable to validate more than one email addresses on debtor maintenance screen. Giving you the red error icon. (Perhaps because its written in that C..Stuff)

Customer tend to just ignore the red icon for this reason.

Attached plugin will validate more than one email address. In VB of course...:).
Attachments
Plugin Debtor Maintenance Validate 2 email addresses.xml
(30.84 KiB) Downloaded 75 times
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Plugin to validate more than 2 email addresses

Postby Mike.Sheen » Fri May 10, 2019 5:05 pm

Ernst wrote:Perhaps because its written in that C..Stuff


No, that's VB.Net.

I didn't like your messagebox method of alerting the user - so I took the liberty of making one (in VB.NET) to handle the semi-colon delimited email addresses and just set or clear the error provider already in place.

Plugin attached.
Plugin Debtor email address validation.xml
(36.99 KiB) Downloaded 68 times


On the topic of validating email addresses - this comes up all the time in the programming world and there is no sure-fire way of validating email addresses, other than attempting to send to the email address and seeing what the result is (which according to RFC 822 that can be up to 5 days of waiting before truly knowing if the email as successfully delivered).

There's a discussion along that lines over here on Whirlpool which I put my 2c into.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Plugin to validate more than 2 email addresses

Postby Ernst » Fri May 10, 2019 5:22 pm

Thats great thanks, will use your copy. Would be nice if JIWA could just validate more than one address for purely syntax errors, without the red icon. :mrgreen:
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Plugin to validate more than 2 email addresses

Postby Mike.Sheen » Fri May 10, 2019 5:26 pm

Ernst wrote:Thats great thanks, will use your copy. Would be nice if JIWA could just validate more than one address for purely syntax errors, without the red icon. :mrgreen:


Well, technically the field is "Email Address" and not "Email Addresses" so a semi-colon isn't technically valid.

The better way to approach this is to have a list of email addresses that you can add to, edit and remove from.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Plugin to validate more than 2 email addresses

Postby Ernst » Fri May 10, 2019 5:31 pm

Tested New Plugin, with this in email address. And No error message. Still flashing red icon.

[email protected]; [email protected]

Same with this.

[email protected]; beth @jiwa.com.au
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Plugin to validate more than 2 email addresses

Postby Mike.Sheen » Fri May 10, 2019 5:38 pm

Ernst wrote:Tested New Plugin, with this in email address. And No error message. Still flashing red icon.

[email protected]; [email protected]

Same with this.

[email protected]; beth @jiwa.com.au


It's the space after the semi-colon.

Either do a .Replace("; ", ";") or don't put the space in there.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Plugin to validate more than 2 email addresses  Topic is solved

Postby Ernst » Fri May 10, 2019 5:42 pm

OK here is an updated version with an extra .trim, So it can handle some spaces.
Attachments
Plugin Debtor email address validation.xml
(36.12 KiB) Downloaded 68 times
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Plugin to validate more than 2 email addresses

Postby Ernst » Mon Sep 09, 2019 10:58 am

Just loaded this plugin for a customer on 7.021

It looks like the email validator, is working from the sales order also. As the sales order now has a red flasher next to the debtor.

When we drill down to debtor, the red flasher is gone.

Is it possible to extend the plugin to include the double email check on the sales order?
User avatar
Ernst
Kohai
Kohai
 
Posts: 216
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

Re: Plugin to validate more than 2 email addresses

Postby Mike.Sheen » Mon Sep 09, 2019 12:14 pm

Ernst wrote:Just loaded this plugin for a customer on 7.021

It looks like the email validator, is working from the sales order also. As the sales order now has a red flasher next to the debtor.


I think you'll find that's something else, not related. The plugin only registers an interest with the debtor maintenance form - so what you are seeing is likely from a different plugin.

On the flashing red icon on the sales order, hover your mouse over it and a tooltip will reveal more information.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron