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

UI label changes for relationship mapping step #976

Merged
merged 1 commit into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ private void populateParentLookupFieldCombo(Combo extIdCombo, RelationshipField
// set the objects reference information
List<String> fieldList = new ArrayList<String>(extIdInfo.getParentObjectFieldMap().keySet());
// add default selection "not selected" to the list to allow users to go back to it
fieldList.add(Labels.getString(
Labels.getString(getClass().getSimpleName() + ".defaultComboText")));
UIUtils.setComboItems(extIdCombo, fieldList, Labels.getString("ForeignKeyExternalIdPage.defaultComboText"));
String defaultListItemStr = Labels.getString(getClass().getSimpleName() + ".defaultComboText");
fieldList.add(defaultListItemStr);
UIUtils.setComboItems(extIdCombo, fieldList, defaultListItemStr);
}

/**
Expand Down Expand Up @@ -266,7 +266,8 @@ private Map<String, Field> saveExtIdData() {
String lookupFieldInParent = combo.getText();
RelationshipField relationshipField = getSelectedParentSObjectForLookupField(relationshipNameInCombo, lookupFieldInParent);
// make sure that the item selection has occurred and that the default text is not displayed anymore
if(relationshipField != null) {
if(relationshipField != null
&& !relationshipField.getParentFieldName().equalsIgnoreCase(Labels.getString(getClass().getSimpleName() + ".defaultComboText"))) {
DescribeRefObject refDescribe = referenceObjects.getParentSObject(relationshipField.toFormattedRelationshipString());
Field relatedField = new Field();
Field parentField = refDescribe.getParentObjectFieldMap().get(lookupFieldInParent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import com.salesforce.dataloader.client.DescribeRefObject;
import com.salesforce.dataloader.controller.Controller;
import com.salesforce.dataloader.dyna.RelationshipField;
import com.salesforce.dataloader.ui.MappingDialog;
import com.sforce.soap.partner.Field;

Expand Down Expand Up @@ -73,8 +74,8 @@ public String getColumnText(Object arg0, int arg1) {
switch (arg1) {
case MappingDialog.FIELD_NAME:
text = field.getName();
if (isReferenceField && !text.contains(":")) {
text = text + ":Id";
if (isReferenceField && !text.contains(RelationshipField.NEW_FORMAT_PARENT_IDLOOKUP_FIELD_SEPARATOR_CHAR)) {
text = field.getRelationshipName() + RelationshipField.NEW_FORMAT_PARENT_IDLOOKUP_FIELD_SEPARATOR_CHAR + "Id";
}
break;
case MappingDialog.FIELD_LABEL:
Expand Down
10 changes: 5 additions & 5 deletions src/main/resources/labels.properties
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ MappingDialog.dragFields=Drag the Salesforce object fields down to the column ma
MappingDialog.saveMapping=Save Mapping
MappingDialog.errorSave=Error while saving mapping
MappingDialog.fileColumn=CSV Column Header
MappingDialog.sforceFieldName=Field Name:Lookup Field Name
MappingDialog.sforceFieldLabel=Field Label (Lookup Field Label)
MappingDialog.sforceFieldType=Data Type (Lookup Object)
MappingDialog.sforceFieldName=Field Name/Relationship
MappingDialog.sforceFieldLabel=Field Label
MappingDialog.sforceFieldType=Field Data Type

OAuthInBrowser.title=Login from Browser
OAuthInBrowser.authStep1Title=Step 1:
Expand Down Expand Up @@ -259,13 +259,13 @@ FinishPage.overwritten=
FinishPage.output=Output
FinishPage.chooseDir=Folder:

ChooseLookupFieldForRelationshipPage.title=Step 2b: (Optional) Use lookup fields of related objects for relationships
ChooseLookupFieldForRelationshipPage.title=Step 2b: (Optional) relate using lookup field
ChooseLookupFieldForRelationshipPage.description=For each related object, select a lookup fields of related objects for relationship fields. Otherwise, leave the selection blank.
ChooseLookupFieldForRelationshipPage.defaultComboText=<Not selected>
ChooseLookupFieldForRelationshipPage.pageMessage=Relationships of {0} are listed below.\nSelect a related object and its lookup field if the CSV refers to the related object using the selected lookup field.
ChooseLookupFieldForRelationshipPage.relationshipHeader=Relationship
ChooseLookupFieldForRelationshipPage.parentObjectHeader=Related Object
ChooseLookupFieldForRelationshipPage.parentLookupFieldHeader=Lookup Field
ChooseLookupFieldForRelationshipPage.parentLookupFieldHeader=Lookup Field of Related Object

HardDeleteFinishPage.title=Step 4: Finish
HardDeleteFinishPage.description=Select the folder where your success and error files will be saved.
Expand Down
Loading