Skip to content
Snippets Groups Projects
Commit 2033a413 authored by Andre Loreth's avatar Andre Loreth
Browse files

Standard-Address: Removed static ID

parent 31454c57
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ import("system.db");
import("Keyword_lib");
import("KeywordRegistry_basic");
import("Contact_lib");
import("Communication_lib");
function StandardObject (pObjectType, pObjectID, pScopeType, pScopeID) {
if (!this._isValidType("object", pObjectType))
......@@ -245,8 +246,8 @@ StandardObject.prototype._getCompanyStandardAddress = function (pOrganisationID)
StandardObject.prototype._hasStandardCommunicationByMedium = function (pContactID, pMediumCategory) {
var dbResult = db.array(db.COLUMN, "select CHAR_VALUE from COMMUNICATION"
+ " left join AB_KEYWORD_ENTRY on KEYID = MEDIUM_ID"
+ " left join AB_KEYWORD_ATTRIBUTERELATION on AB_KEYWORD_ENTRY_ID = AB_KEYWORD_ENTRYID and AB_KEYWORD_ATTRIBUTE_ID = '7250ff28-1d48-41cc-bb36-8c33ace341bb'"
+ " where STANDARD = 1 and CONTACT_ID = '" + pContactID + "'");
+ " left join AB_KEYWORD_ATTRIBUTERELATION on AB_KEYWORD_ENTRY_ID = AB_KEYWORD_ENTRYID"
+ " where STANDARD = 1 and CONTACT_ID = '" + pContactID + "' and KEYID in ('" + CommUtil.getMediumIdsByCategory(pMediumCategory).join("', '") + "')");
return dbResult.indexOf(pMediumCategory) !== -1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment