fix: implemented solution to solve lookup contact sap
parent
5b57300b16
commit
ebe4f901f7
|
|
@ -34,8 +34,11 @@ async function lookupContactByPhone(rest, authentication, crmPhone, companyId, t
|
|||
|
||||
console.log("PAYLOAD CONFIG LOOKUP CONTACT BY PHONE CONFIG.url 1: ", config.url)
|
||||
|
||||
if(config.url.includes("+")){
|
||||
config.url = config.url.replace("+", "")
|
||||
// Para consultar contato crm SAP, necessário consultar sem sinal de + no inicio numero
|
||||
const pattern = /%2B\+/g;
|
||||
|
||||
if (pattern.test(config.url)){
|
||||
config.url = config.url.replace(/%2B\+/g, '%2B');
|
||||
}
|
||||
|
||||
console.log("PAYLOAD CONFIG LOOKUP CONTACT BY PHONE CONFIG.url 2: ", config.url)
|
||||
|
|
|
|||
Loading…
Reference in New Issue