You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We encountered this issue when importing a very old dataset with strange lookup fields that includes URL-unsafe characters into salesforce as an external ID field.
For instance:
salesforce.Account.get_by_custom_id("Custom_Field__c", 'B6042540754$FU>/ZAdv') will return a not found exception, even if the record was
previously created and has an external ID field 'Custom_Field__c' set to 'B6042540754$FU>/ZAdv'.
The fix for us was two changes in lines 12 and 828 of api.py:
In Line 12: from urllib.parse import urljoin, urlparse, quote_plus
and In line 828 (get_by_custom_id) custom_url = urljoin(self.base_url, f'{custom_id_field}/{quote_plus(custom_id)}')
Which escapes URL-unsafe characters appropriately.
Not sure if such a small change deserves its own PR. Just sharing what worked for us.
The text was updated successfully, but these errors were encountered:
We encountered this issue when importing a very old dataset with strange lookup fields that includes URL-unsafe characters into salesforce as an external ID field.
For instance:
salesforce.Account.get_by_custom_id("Custom_Field__c", 'B6042540754$FU>/ZAdv') will return a not found exception, even if the record was
previously created and has an external ID field 'Custom_Field__c' set to 'B6042540754$FU>/ZAdv'.
The fix for us was two changes in lines 12 and 828 of api.py:
In Line 12:
from urllib.parse import urljoin, urlparse, quote_plus
and In line 828 (get_by_custom_id)
custom_url = urljoin(self.base_url, f'{custom_id_field}/{quote_plus(custom_id)}')
Which escapes URL-unsafe characters appropriately.
Not sure if such a small change deserves its own PR. Just sharing what worked for us.
The text was updated successfully, but these errors were encountered: