Skip to content
Snippets Groups Projects
Commit 94461347 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1045382][Schnelleingabe - Erfasste...

[Projekt: Entwicklung - Neon][TicketNr.: 1045382][Schnelleingabe - Erfasste Firmenadresse wird bei der Kontaktperson abgelegt und nicht bei der Firma]
parent 098f14a4
No related branches found
No related tags found
No related merge requests found
Showing with 26 additions and 21 deletions
......@@ -14,9 +14,7 @@ if (usageFilter)
var keywordAttribute = new KeywordAttribute($KeywordRegistry.addressType(), usageFilter);
cond.and("AB_KEYWORD_ENTRY.AB_KEYWORD_ENTRYID",
newSelect("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID")
.from("AB_KEYWORD_ATTRIBUTERELATION")
.where(["AB_KEYWORD_ATTRIBUTERELATION", keywordAttribute.dbField], "1"),
keywordAttribute.getSqlBuilderSelect().and(["AB_KEYWORD_ATTRIBUTERELATION", keywordAttribute.dbField], "1"),
SqlBuilder.IN())
}
......
......@@ -457,12 +457,6 @@
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
<name>ContactType_param</name>
<expose v="false" />
</entityParameter>
</children>
</entityProvider>
<entityParameter>
<name>ReplaceStandardAddress_param</name>
......
import("system.logging");
import("system.vars");
import("system.result");
import("Contact_lib");
......
......@@ -30,6 +30,10 @@
<name>ContactId_param</name>
<valueProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/adresses/children/contactid_param/valueProcess.js</valueProcess>
</entityParameter>
<entityParameter>
<name>ContactType_param</name>
<valueProcess>%aditoprj%/entity/QuickEntry_entity/entityfields/adresses/children/contacttype_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityConsumer>
......
import("system.vars");
import("system.result");
result.string(vars.get("$field.UID"));
\ No newline at end of file
result.string(vars.get("$field.PERSON_CONTACT_ID"));
\ No newline at end of file
import("system.vars");
import("system.result");
var contacts = vars.get("$field.Contacts.insertedRows").map(function (row)
{
return row["CONTACTID"];
});
result.string(JSON.stringify(contacts));
import("system.result");
import("Contact_lib");
result.string("contact");
\ No newline at end of file
result.object(Contact.TYPES.Contact);
\ No newline at end of file
import("system.result");
import("Contact_lib");
result.string("organisation");
\ No newline at end of file
result.object(Contact.TYPES.Organisation);
\ No newline at end of file
......@@ -282,6 +282,22 @@ KeywordAttribute.prototype.getValue = function(pKeyId)
return this.defaultValue;
}
/**
* get a SqlBuilder object for this keyword attribute. You can easily add additional conditions to it.
*
* @return {SqlBuilder} a SqlBuilder which contains a select for the entry-id's, joins to entry and attribute
* and conditions for the container and the attribute-name.
*/
KeywordAttribute.prototype.getSqlBuilderSelect = function()
{
return newSelect("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID")
.join("AB_KEYWORD_ENTRY", "AB_KEYWORD_ENTRYID = AB_KEYWORD_ENTRY_ID", "attrEntry")
.join("AB_KEYWORD_ATTRIBUTE", "AB_KEYWORD_ATTRIBUTEID = AB_KEYWORD_ATTRIBUTE_ID")
.from("AB_KEYWORD_ATTRIBUTERELATION")
.where(["AB_KEYWORD_ENTRY", "CONTAINER", "attrEntry"], this.container)
.and("AB_KEYWORD_ATTRIBUTE.NAME", this.attribute)
}
/**
* check if the Container can have the attribute.
* @return {Boolean} true if it exists, false if not
......
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