+ Start a Discussion
moverstrommoverstrom 

Problem with upserting using API for AppExchange App

I am developing an application for the AppExchange that uploads data to users' Salesforce accounts.  I am upserting data using a custom external id field that is included with my application package.  The application works fine on developer edition accounts, but once I tested it on a Professional Edition account, it failed saying 'Field name provided does not match external id'.  I have AppExchange certification, so accessing the Pro edition accounts isn't a problem, just upserting.  Looking through the field definition, it is the same on my test developer accounts and pro account.  The field is set as an external id, so it should work.  Anyone know what's going on here?
SriniKSriniK

Hi

We are facing the same problem. Let us know if anybody have some insights on this.

 

Thanks

Srinivas

moverstrommoverstrom
Anybody from Salesforce know a way around this problem?
n8n8
Is your package managed or unmanaged?  Does your development organization have a namespace?  Do the subscriber organizations have namespaces?

The namespace changes the field API name, so that could be the problem.  And if you're using an unmanaged package, the field namespace may change on install.  The field assumes the namespace of the organization.  So if your dev org has a namespace and the subscriber org does not - or if the subscriber org is itself a dev org with a different namespace - then the API query with the qualified name from the dev org won't work with the subscriber org.

I believe there is a way to specify the default namespace in the Partner API via a header... but I don't recall the details on that.
SriniKSriniK
Thanks for the reply. Our app is managed (has a namespace).. the subscriber has PE edition of salesforce.
 
With PE edition,  if the fields are not placed on pagelayout.. the API complains "INVALID_FIELD: No such column 'FieldName__c' on entity 'opportunity'", then we know tjhat subscriber has not placed the field on the pagelayout.
But yesterday, for the first time we have seen, the error as
"INVALID_FIELD: Field name provided, FieldName__c does not match an External ID for Opportunity "
 
Then the subscriber made sure that all fields were placed on pagelayout and it worked.
 
 
SuperfellSuperfell
As professional edition has no FLS feature, API access to fields is controlled by their placement on the page layout. (i.e. the field has to be on the page layout to be accessible via the API)