Why when running a saved search from a suitecommer...
# ask-stanley-ai
e
Why when running a saved search from a suitecommerce extension I keep getting a phone number with the country extension? but I do not get it if I run the same saved search from the ERP UI
c
AI generated answer (using internal Slack threads):
The discrepancy you're experiencing when running a saved search from a SuiteCommerce extension versus the ERP UI could be due to the way the SuiteCommerce extension is handling the phone number field. In NetSuite, phone numbers are typically stored as strings, and it's possible that the SuiteCommerce extension is appending the country code when it retrieves the phone number. This could be a built-in feature of the extension, or it could be due to some custom code that's running as part of the extension. On the other hand, when you run the same saved search from the ERP UI, it's likely that the UI is simply displaying the phone number as it's stored in the database, without appending the country code. To resolve this issue, you might need to modify the SuiteCommerce extension or adjust the way you're handling the phone number field in your saved search. For example, you could try using a formula field in your saved search to strip out the country code from the phone number. Here's a sample formula that might help:
Copy code
code
CASE WHEN {phone} LIKE '+%' THEN SUBSTR({phone}, 4) ELSE {phone} END
This formula checks if the phone number starts with a '+', which is often used to denote a country code. If it does, it removes the first three characters (assuming the country code is three characters long, including the '+'). If the phone number doesn't start with a '+', it simply returns the phone number as is. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811561704
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.806906879
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803325951
Please provide your feedback on this answer.