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

fix: Account table name and Assignment reference. #33

Merged
Merged
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 @@ -47,13 +47,13 @@ public class ReferenceUtil {

/**
* Validate reference
* TODO: Add support to Resource Assigment reference to get display column
* @param displayTypeId
* @return
*/
public static boolean isLookupReference(int displayTypeId) {
if (DisplayType.isLookup(displayTypeId)
|| DisplayType.Account == displayTypeId
|| DisplayType.Assignment == displayTypeId
|| DisplayType.ID == displayTypeId
|| DisplayType.Location == displayTypeId
|| DisplayType.Locator == displayTypeId
Expand Down Expand Up @@ -143,6 +143,9 @@ public static String getTableNameFromReference(String columnName, int referenceI
if(DisplayType.ID == referenceId || DisplayType.Search == referenceId
|| DisplayType.Table == referenceId || DisplayType.TableDir == referenceId) {
tableName = columnName.replaceAll("(_ID_To|_To_ID|_ID)$", "");
if (columnName.endsWith("_Acct")) {
tableName = I_C_ElementValue.Table_Name;
}
} else if (DisplayType.List == referenceId) {
tableName = I_AD_Reference.Table_Name;
} else if (DisplayType.Location == referenceId) {
Expand All @@ -162,4 +165,5 @@ public static String getTableNameFromReference(String columnName, int referenceI
}
return tableName;
}

}
Loading