Can we do mobile number masking and email masking in suiteCRM?

Hi every one ?

Can we do mobile number masking and email masking in suiteCRM .

for instance , where ever phone number and email is there ,those places we have to display like this ********12 and **************@gmail.com .

This is for little bit security perpose ,Could you please help on it ?

Thanks
Sandeep

Hi,
if you want to hide information without creating a custom solution, the “suite-way” is to put those fields into a new module, relate it to the ones you use and set permissions accordingly.

The issue with your approach: even if you make the detail/list-view display those stars instead, users will still be able to access the information using different methods (reports, exports, api-access…)

@crmspace thank you for your valuable reponse ,I am not trying to hide the information ,what exactly I need ,
for instance I have account module ,in that module I have field called phone number and emial Id ,this two fields values I have to display last two charactors or 3 charactors like shown below ,

********12 and **************@gmail.com

I am trying to replace ‘*’ while display ,we have three views detail view ,edit view and list view ,
If we take list view of account I have to change(replace first 8 charactors with *) the variable value of phone number while display at list view .
But which file I have to change ,i am unable to find the file ,

Or is there any way we have to do this ,kindly help on it and save my day .

Thanks

Hi, I get what you need.
I am sharing a code. Hoping, it is helpful for you.

JavaScript Code

var email = “dpk@gmail.com”, phone = “9793892775”;

function hide_email_mob(item, type) {
   switch (type) {
       case 'email':
           var parts = item.split("@"), len = parts[1].length;
           return email.replace(parts[0], "*".repeat(len - 2));
       case 'phone':
           return "*".repeat(item.length -1) + item.slice(-3);
      default:
           throw new Error("Undefined type: " + type);
   }        
}

console.log(hide_email_mob(email, 'email'));  
console.log(hide_email_mob(phone, 'phone'));  
</script>

PHP Code

$number = '9793892775';
echo str_pad(substr($number, -3), strlen($number), '*', STR_PAD_LEFT);
1 Like

It is not working for me for some reason.