openServiceNowForm prefill values - Difference between Agent workspace and Classic workspace

RLeune
Tera Contributor

Hi,

 

We are using the openFrameAPI to open a form with prefilled values (openServiceNowForm).

We noticed a difference in behaviour between the Agent workspace and the Classic workspace when using the openServiceNowForm API call.

 

When prefilling a phone field, we send an E164 formatted phone number, e.g. +14085018550.

 

In the Classic workspace the '+' will be stripped and it ends up as '14085018550' in the form.

We therefore encode the '+' to '%2B' before we send it. ServiceNow decodes the '%2B' to '+' and it ends up as '+14085018550' in the form.

 

In the Agent workspace the '+' will NOT be stripped and it ends up as '+14085018550' in the form.

When we do encode the '+' to '2%B', the phone number ends up as '%2B14085018550' in the form.

It seems like ServiceNow encodes the phone number from the send value and then decodes it again in the form.

Which means it will be encoded twice.

 

We have both customers that use the Classic workspace and customers that use the Agent workspace and we haven't found a way to get it to work in both workspaces at the same time.

 

Is there a way to get this to work? (meaning both workspaces will show a '+' in the form. 

   

0 REPLIES 0