• NMISHRA
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 14
    Replies

Hi,

  

 Uisnh zksClient, I am trying find a contact by phone number irrespective of how the phone number is recorded in SalesForce.com, w/o punctuations, long distance codes and others. When using the following sample SOQL query to find a contact by phone number (xxx) yyy-zzz (the way it is received from phone system):

 

select FirstName, LastName, Id, phone where phone like  '%(xxx) yyy-zzzz''

 

I'm able to find a Contact whose phone# is exactly (xxx) yyy-zzz or something like +1(xxx) yyy-zzzz but it can't match numbers like:

 

(xxx)yyy-zzzz(with no embedded blanks)

xxx-yyy-zzzz

1xxxyyyzzzz

001xxxyyyzzzz

(xxx)  yyy - zzzz(multiple embedded blanks)

 

So, in case the phone number is not stored in correct format, the contact is not found even though the phone number is basically the same. How to best handle that?

 

I looked into SOSL queries as well which look more robust and I can write query like: 

 

FIND {xxxyyyzzzz} IN phone fields returning contact(id, phone, mobilephone, homephone, otherphone, firstname, lastname)

 

That works well and is able to search all the phone fields but it does not seem to have option to specify wildcards like %xxxyyyzzzz. So, it is not able to find phone numbers like:

 

+1(xxx)  yyy-zzzz

+1  (xxx) yyy-zzzz

 

How to best find contact by phone number(preferably via a single query) while ignoring the punctuations and other special characters?

 

Thanks again and regards

Hi,

 

  Is there a sample code snippet of using the search method of the zksForceClient when it returns objects of multiple types(like Account, Contact and others)? 

 

Thanks in advance and regards

Hi,

 

  I'm using Salesforce.com partner web service to search a contact by phone number and using SOQL in its query call. It looks like the phone number has to match exactly. For instance, the following SOQL query:

 

select FirstName, LastName, Id, phone where phone like  '%(xxx) yyy-zzzz')

 

is able to find a Contact whose phone# is exactly (xxx) yyy-zzz or something like +1(xxx) yyy-zzzz but it can't match numbers like:

 

(xxx)yyy-zzzz(with no embedded blanks)

xxx-yyy-zzzz

1xxxyyyzzzz

001xxxyyyzzzz

(xxx)  yyy - zzzz(multiple embedded blanks)

 

Is there a way to write a SOQL query so that it matches a contact's phone number regardless of the punctuation?

 

Thanks in advance and regards

Hi,

 

  I'm looking at the zksForceClient and somehow don't see a logout method in there. Is there plan to add logout functionality as well? (An API applicaton can logout from SF.com when it is exiting.)

 

Thanks and regards

 

Hi,

 

  I recently created a developer edition account. I can login using the browser all right but, when I try to login using the partner web service, I get LOGIN_MUST_USE_SECURITY_TOKEN soap fault. So, I generated a new security token and I can login when I append that token to the password. I added my desktop's IP address(as I see in my ipconfig as in my corporate network) as a trusted IP address but still I can't login unless I use the security token along with the password. Or does it need a public IP address for it to work(as opposed to an IP address which might be visible only inside corporate network)?

 

Is that expected behavior? Or is that something true for the developer edition accounts and will not be an issue in production systems when using API to login to the partner web service?

 

Thanks in advance and regards

 

Hi,

 

  We can use the SF.com partner web service to login as a user (who is enabled for API access), search Contacts based on phone# and get the Contact ID all right. Now, we need to "popup" the contact in the browser using which the same user is logged in to SF.com on the same PC. The URL to pop contact works obviously only if it is built using the exact same force.com endpoint in the user’s browser session. Is it possible that, for the same user, session started using the partner web service and browser could be on different SF.com instance? Or, for the same user, no matter how the session is started (from browser or web service or otherwise,) will it always use the same SF.com instance? 

 

Assuming it is indeed true, we are planning to use the SF.com endpoint URL returned in “serverUrl” when using the web service to derive the endpoint URL for the user’s browser session using the following scheme:
 
The “serverURL” returned in the login response from the partner web service is something like this:  https://na1-api.salesforce.com/services/Soap/c/22.0/xxxxx
 
And, the SF.com URL for the same user’s browser session is something like this: https://na1.salesforce.com/home/home.jsp.
 
So, after retrieving the contact’s ID (say yyyyy) from the partner web service, we can make the contact URL to pop by transforming the “serverURL” accordingly (by removing the “-api” from it and then trimming all text after salesforce.com, that is, “services/Soap/c/22.0/xxxxx”) and adding contact’s id to it. The resultant URL becomes https://na1.salesforce.com/yyyyy and we can trigger browser to navigate to it which then shows the contact correctly in the user’s browser session. This approach seems to work but it will be great if it can be confirmed that it is indeed the correct approach of deriving the contact’s URL for showing the contact in the user's browser session or it might have some nuances to consider.

 

Thanks in advance and regards

 

Hi,

  

 Uisnh zksClient, I am trying find a contact by phone number irrespective of how the phone number is recorded in SalesForce.com, w/o punctuations, long distance codes and others. When using the following sample SOQL query to find a contact by phone number (xxx) yyy-zzz (the way it is received from phone system):

 

select FirstName, LastName, Id, phone where phone like  '%(xxx) yyy-zzzz''

 

I'm able to find a Contact whose phone# is exactly (xxx) yyy-zzz or something like +1(xxx) yyy-zzzz but it can't match numbers like:

 

(xxx)yyy-zzzz(with no embedded blanks)

xxx-yyy-zzzz

1xxxyyyzzzz

001xxxyyyzzzz

(xxx)  yyy - zzzz(multiple embedded blanks)

 

So, in case the phone number is not stored in correct format, the contact is not found even though the phone number is basically the same. How to best handle that?

 

I looked into SOSL queries as well which look more robust and I can write query like: 

 

FIND {xxxyyyzzzz} IN phone fields returning contact(id, phone, mobilephone, homephone, otherphone, firstname, lastname)

 

That works well and is able to search all the phone fields but it does not seem to have option to specify wildcards like %xxxyyyzzzz. So, it is not able to find phone numbers like:

 

+1(xxx)  yyy-zzzz

+1  (xxx) yyy-zzzz

 

How to best find contact by phone number(preferably via a single query) while ignoring the punctuations and other special characters?

 

Thanks again and regards

Hi,

 

  Is there a sample code snippet of using the search method of the zksForceClient when it returns objects of multiple types(like Account, Contact and others)? 

 

Thanks in advance and regards

Hi,

 

  I'm using Salesforce.com partner web service to search a contact by phone number and using SOQL in its query call. It looks like the phone number has to match exactly. For instance, the following SOQL query:

 

select FirstName, LastName, Id, phone where phone like  '%(xxx) yyy-zzzz')

 

is able to find a Contact whose phone# is exactly (xxx) yyy-zzz or something like +1(xxx) yyy-zzzz but it can't match numbers like:

 

(xxx)yyy-zzzz(with no embedded blanks)

xxx-yyy-zzzz

1xxxyyyzzzz

001xxxyyyzzzz

(xxx)  yyy - zzzz(multiple embedded blanks)

 

Is there a way to write a SOQL query so that it matches a contact's phone number regardless of the punctuation?

 

Thanks in advance and regards

Hi,

 

  I'm looking at the zksForceClient and somehow don't see a logout method in there. Is there plan to add logout functionality as well? (An API applicaton can logout from SF.com when it is exiting.)

 

Thanks and regards

 

Hi,

 

  I recently created a developer edition account. I can login using the browser all right but, when I try to login using the partner web service, I get LOGIN_MUST_USE_SECURITY_TOKEN soap fault. So, I generated a new security token and I can login when I append that token to the password. I added my desktop's IP address(as I see in my ipconfig as in my corporate network) as a trusted IP address but still I can't login unless I use the security token along with the password. Or does it need a public IP address for it to work(as opposed to an IP address which might be visible only inside corporate network)?

 

Is that expected behavior? Or is that something true for the developer edition accounts and will not be an issue in production systems when using API to login to the partner web service?

 

Thanks in advance and regards

 

Hi,

 

  We can use the SF.com partner web service to login as a user (who is enabled for API access), search Contacts based on phone# and get the Contact ID all right. Now, we need to "popup" the contact in the browser using which the same user is logged in to SF.com on the same PC. The URL to pop contact works obviously only if it is built using the exact same force.com endpoint in the user’s browser session. Is it possible that, for the same user, session started using the partner web service and browser could be on different SF.com instance? Or, for the same user, no matter how the session is started (from browser or web service or otherwise,) will it always use the same SF.com instance? 

 

Assuming it is indeed true, we are planning to use the SF.com endpoint URL returned in “serverUrl” when using the web service to derive the endpoint URL for the user’s browser session using the following scheme:
 
The “serverURL” returned in the login response from the partner web service is something like this:  https://na1-api.salesforce.com/services/Soap/c/22.0/xxxxx
 
And, the SF.com URL for the same user’s browser session is something like this: https://na1.salesforce.com/home/home.jsp.
 
So, after retrieving the contact’s ID (say yyyyy) from the partner web service, we can make the contact URL to pop by transforming the “serverURL” accordingly (by removing the “-api” from it and then trimming all text after salesforce.com, that is, “services/Soap/c/22.0/xxxxx”) and adding contact’s id to it. The resultant URL becomes https://na1.salesforce.com/yyyyy and we can trigger browser to navigate to it which then shows the contact correctly in the user’s browser session. This approach seems to work but it will be great if it can be confirmed that it is indeed the correct approach of deriving the contact’s URL for showing the contact in the user's browser session or it might have some nuances to consider.

 

Thanks in advance and regards