Phone number field

moustafa
Kilo Explorer

How to obtain automatically the phone number fields ?

1 ACCEPTED SOLUTION

Where you wanna get it?



If you want just to display the phone no of the caller on the current form, you can go to personalize/configure >form layout > caller.phone



If you are creating a field on the current form and depending on the caller you want to populate it with the caller's phone no then you have to write an onChange client script on caller field and get the phone no from sys_user table.


View solution in original post

6 REPLIES 6

Tanaji Patil
Tera Guru

Hi Mustapha,



Select the type as Phone Number (E164).


String field that provides E164-compliant formatting and validation for telephone numbers (starting with the Dublin release). See Using Phone Number Fields.



Thanks,


Tanaji


I mean how to get it from sys_user table ?


onChange client script on Caller field:



function onChange(control, oldValue, newValue, isLoading) {


    if (isLoading)


          return;




    if (newValue == '') {


          g_form.setValue('<your field name>', '');


          return;


    }




    if (!g_form.getControl('<your field name>'))


          return;




    var caller = g_form.getReference('caller_id', setMobile);


}




function setMobile(caller) {


    if (caller)


            g_form.setValue('<your field name>', caller.mobile_phone);


}


Where you wanna get it?



If you want just to display the phone no of the caller on the current form, you can go to personalize/configure >form layout > caller.phone



If you are creating a field on the current form and depending on the caller you want to populate it with the caller's phone no then you have to write an onChange client script on caller field and get the phone no from sys_user table.