Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate fields in lookup data query #2395

Closed
githubbob42 opened this issue Aug 14, 2014 · 0 comments
Closed

Duplicate fields in lookup data query #2395

githubbob42 opened this issue Aug 14, 2014 · 0 comments

Comments

@githubbob42
Copy link
Owner

Mingle Card: 2663
Steps to reproduce

| | |
|-|-|
|**Version #**|
| |
|**OS**|
| |
|**Browser**|
| |
|**Username**|
|[email protected]|
|**Password**|
|computer#777|

  

 


  1. Sync

Expected result

It works

Actual Result

Error: \n
FX5__Role_on_Job__c,FX5__Role_on_Job__r.Id,Pay_Rate__c FROM FX5__Crew_Planning__c\n ^\n
ERROR at Row:1:Column:651\n
duplicate field selected: Pay_Rate__c\n

The issue is caused by a search layout for CrewPlanning that contains a picklist field. 

The fields required for lookup data is determined by creating a unique set of field names between the metadata and columns specified in the search layout. Picklist fields in a search layout are wrapped in toLabel() which does not match the unwrapped field name in the object metadata, resulting in a duplicate field in the query EXAMPLE: Pay_Rate__c and toLabel(Pay_Rate__c)

Solution is to unwrap search layout fields so we don't get duplicates.

Related Cards

Test Plan

We need to add a test scenario (or configure one of the test orgs) to include custom picklist fields in a search layout for one of the lookups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant