Closed nima0102 closed 2 years ago
It is case sensitive. How is the number stored for that record? ie... 626-555-555 (record actual data in the contact)
suitecrm.Contacts.get(phone_mobile=626555555) # No record found
suitecrm.Contacts.get(phone_mobile=(+1626555555) # No record found
suitecrm.Contacts.get(phone_mobile=(626-555-555) # Record found
You can always run suitecrm.Contacts.fields()
to get the list of fields that are searchable.
@RussellJuma Thank you so much for your quick reply. I just updated the comment.
we store the number with this format : +[country code][actual phone number] example: +999333333
but after changed the store format to [country code][actual phone number] ( example 999333333 ) without "+" character, now it is working as we expect.
No worries, glad I could help. You can always run suitecrm.Contacts.fields()
to get the list of fields that are searchable.
still there is a bug
in order to replicate:
above scenario would not work.
I have found the problem.
phone number special character was causing problems with the url encoding.
@RussellJuma Perfect. thanks. I am glad to report this bug and thank you for your support!
Already ready.
On Sat, Aug 13, 2022, 7:55 AM nima0102 @.***> wrote:
@RussellJuma https://github.com/RussellJuma Perfect. thanks. I am glad to report this bug and thank you for your support! When do you think the patched version would be available on pip ?
— Reply to this email directly, view it on GitHub https://github.com/RussellJuma/PySuiteCRM/issues/4#issuecomment-1214172307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYGJYN6RL55GS7Y7NTICXLVY6ZMPANCNFSM56OBCRVQ . You are receiving this because you were mentioned.Message ID: @.***>
Hello Russell,
First of all, really appreciate your awesome python module. In our use case, we need to search based on "phone_mobile" field which is a built-in field ( not custom field ). We store the phone_mobile in "+[country code][phone number] format.
after doing lots of trial and error, it turned out that if we store phone_mobile without "+", get method can find otherwise it would not find any matched record.
example:
) stored phone_mobile = +999333333 result = suitecrm.Contacts.get(phone_mobile=''+999333333") ( NOT working )
) stored phone_mobile = 992222222 result = suitecrm.Contacts.get(phone_mobile=''992222222") ( working )
Can you please advise?
thanks.