Intervat 8.0: Mind the phone numbers! (4)

Sorry to bother you again with this, but there seems to be something wrong with the current update for Intervat 8.0. No, read my words carefully: there seems to be something wrong.

In this case, it's totally intervat's responsibility, as they seem to have miscommunicated the wrong XSD.

It's about the phonenumber in the xml-file. It should not contain any special characters, only numeric. But if you look at their xsd, it mentions this:

      <xs:simpleType name="PhoneNumber_Type">

            <xs:annotation>

                  <xs:documentation>A telephone number</xs:documentation>

            </xs:annotation>

            <xs:restriction base="xs:string">

                  <xs:pattern value="(\+)?[0-9]{1,20}"/>

            </xs:restriction>

      </xs:simpleType>

As you can see, you should be able to provide a "+" (quite common in phone numbers). Although, it seems to fail on that sign (again, this is not confirmed by anyone, only our own experience .. ).

How did we resolve this issue?

Simple: you should only change codeunit 11308 "INTERVAT Helper". In function GetValidPhoneNumber, you'll find these lines:

IF Phone[1] = '+' THEN

EXIT('+' + RemoveNonNumericCharacters(Phone));

We changed this in the following:

IF Phone[1] = '+' THEN

EXIT('00' + RemoveNonNumericCharacters(Phone));

This seemed to have solved our issue.

Is it solved because Intervat made a last-minute change? or was this the real solution to our problem? Well, I don't know, but there is no reason not to change the "+" in the double zero and avoid any support there might be needed because of the bleeping '+'-sign, is there ;°).

Disclaimer

You can use this code at your own risk .. There are no warranties ... and all the other things that needs to be mentioned in a proper disclaimer for me to not be responsible for anything you do because of this post.. :-)

Comment List
Related
Recommended