Skip to Content
avatar image
Former Member

Phone Fields in SAP Business One

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 19, 2017 at 01:13 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Apr 18, 2017 at 11:01 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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