Skip to Content
0

Phone Fields in SAP Business One

Apr 18, 2017 at 07:06 AM

66

avatar image

Hello everybody,

I would like to know if there is a way to find out, using UI API, when a user clicks on a field if this field contains a phone number.

Have noticed that in Business One when I hover on specific fields build to contain phone numbers, a telephone icon appears next to my mouse pointer.

Any suggestions would be appreciated.

Kind regards,

Dimitris Theotokatos

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
DIEGO LOTHER Apr 19, 2017 at 01:13 AM
1

Hi Dimitris,

I believe there is no specific way to know if the field represent a phone field. But when the user click on a field you can get the value from the field and check with a regex expression if the value has the phone number format.

Look this post about regex for phone numbers.

http://stackoverflow.com/questions/18091324/regex-to-match-all-us-phone-number-formats

Hope it helps.

Kind Regards,

Diego Lother

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Diego,

thanks a lot for the tip.

Hoped that there would be a more official way to get phone fields from SAP Business One but I guess I will stick to the regular expression way.

Kind regards,

Dimitris Theotokatos

0
ANKIT CHAUHAN
Apr 18, 2017 at 11:01 AM
0

Hi,

Have you created the UserField as below and checked the issue?

SAPbobsCOM.UserFieldsMD oUserFieldsMD = (SAPbobsCOM.UserFieldsMD)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields);
oUserFieldsMD.Type = SAPbobsCOM.BoFieldTypes.db_Alpha;
oUserFieldsMD.SubType = SAPbobsCOM.BoFldSubTypes.st_Phone;

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Ankit,

I would like to get all existing fields which the phone icon appears and not only user defined fields.

Kind regards,

Dimitris Theotokatos

0