
import ABSL;
var phone;
this.phoneInvalidRel = false;
var BPRelationship = this;
if ( !BPRelationship.ContactPerson.IsSet())
return;
var contact = BPRelationship.ContactPerson;
if( !contact.ContactPersonWorkplaceAddressInformation.IsSet())
return;
var workplaceAddress = contact.ContactPersonWorkplaceAddressInformation;
if( !workplaceAddress.ContactPersonWorkplaceAddress.DefaultMobilePhone.IsSet())
return;
phone = workplaceAddress.ContactPersonWorkplaceAddress.DefaultMobilePhone;
if( phone.FormattedNumberDescription.IsInitial())
return;
if( phone.FormattedNumberDescription.FindRegex("1\\d{10}") < 0){
// raise "Invalid mobile phone number!";
this.phoneInvalidRel = true;
raise Error_phone_msg_rel.Create("E", phone.FormattedNumberDescription );
}
import ABSL;
return !this.phoneInvalidRel;
import ABSL;
var phone;
var common = this.Common.GetFirst();
common.phoneInvalid = false;
if( !this.CurrentDefaultIsContactPersonFor.IsSet())
return;
var currentDefaultContact = this.CurrentDefaultIsContactPersonFor;
var BPRelationship = currentDefaultContact.BusinessPartnerRelationship;
if ( !BPRelationship.ContactPerson.IsSet())
return;
var contact = BPRelationship.ContactPerson;
if( !contact.ContactPersonWorkplaceAddressInformation.IsSet())
return;
var workplaceAddress = contact.ContactPersonWorkplaceAddressInformation;
if( !workplaceAddress.ContactPersonWorkplaceAddress.DefaultMobilePhone.IsSet())
return;
phone = workplaceAddress.ContactPersonWorkplaceAddress.DefaultMobilePhone;
if( phone.FormattedNumberDescription.IsInitial())
return;
if( phone.FormattedNumberDescription.FindRegex("1\\d{10}") < 0){
// raise "Invalid mobile phone number!";
common.phoneInvalid = true;
raise Error_phone_msg.Create("E", phone.FormattedNumberDescription );
}
import ABSL;
var common = this.Common.GetFirst();
return !common.phoneInvalid;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |