Seems like a super basic question, but I’m just starting to use SuiteCRM 8. When I enter a phone number in SuiteCRM 7 like 111-111-1111 ext. 111 is how I normally handle extensions. SuiteCRM 8 won’t accept this!
What are other people doing? Is there a specific format extensions must be entered in? Or do I need to create an additional field for extension?
rsp
9 January 2025 14:51
2
What to do you mean? Maybe you need to create logic hook with regex to handle your requirement.
Hi everbody,
I need some help. I want to create auto phone number formatting.
I entering this format at first --> 902161111111
Then I want it to be converted to this format after saving–> +90(216) 111 1111
I try logichooks. But I failed.Please help me.
Thank you.
Regex for phone number - iHateRegex
I don’t need to to “re-format” a phone number and extension, I just want to know how to enter a phone number with an extension.
rsp
9 January 2025 14:57
4
Is ext anothe filed before phone field?
I could able to add this number in 8.8 beta for account module
Yes, that’s one option I could add another field for “extension”, I’m wondering if that’s the optimal solution or is there some format that phone can be entered in the phone field.
rsp
9 January 2025 16:12
6
I think there is no particular format for phone field. You may need to find out code related to it.
import {BaseFieldComponent} from '../../../base/base-field.component';
import {DataTypeFormatter} from '../../../../services/formatters/data-type.formatter.service';
import {FieldLogicManager} from '../../../field-logic/field-logic.manager';
import {FieldLogicDisplayManager} from '../../../field-logic-display/field-logic-display.manager';
@Component({
selector: 'scrm-phone-detail',
templateUrl: './phone.component.html',
styleUrls: []
})
export class PhoneDetailFieldComponent extends BaseFieldComponent {
constructor(
protected typeFormatter: DataTypeFormatter,
protected logic: FieldLogicManager,
protected logicDisplay: FieldLogicDisplayManager
) {
super(typeFormatter, logic, logicDisplay);
}
getTelLink(phone: string): string {
I can’t be the only one that needs to enter in extensions in people’s phone numbers in SuiteCRM 8! I can’t believe this hasn’t been asked before.
rsp
9 January 2025 16:52
8
Yeah! It is strange that no one asked about it. I did not find any issues or PRs on the GitHub too.
mcom
15 January 2025 03:08
9
I just tried the online demo and ext 123 doesn’t work but I’ve always used x123 and that still works.
rsp
15 January 2025 14:55
10
Can you please provide some example here that how you write it? So, it will help @pstevens and others to understand it.
adding x10 does not work for me on SuiteCRM 8 in my installation.
So I eventually opted for just creating another field.
This is not ideal, it would be great if it just accepted 111-111-1111;ext.123 then the mobile phone dialer link will work in mobile.
(I know I can customize this field type, but it seems to me like this is something everyone would want a standardized solution to)
1 Like
rsp
15 January 2025 21:03
13
Yeah, that’s true! We need field which accept extension too.