Skip to content
Snippets Groups Projects
Commit 848cc08a authored by Andreas Schindlbeck's avatar Andreas Schindlbeck
Browse files

Vertriebsproject: REASONS / Liste

parent d69ca60f
No related branches found
No related tags found
No related merge requests found
......@@ -453,13 +453,15 @@
<entityField>
<name>REASONS</name>
<title>Reason</title>
<consumer>KeywordWonLost</consumer>
<mandatoryProcess>%aditoprj%/entity/Salesproject_entity/entityfields/reasons/mandatoryProcess.js</mandatoryProcess>
<possibleItemsProcess>%aditoprj%/entity/Salesproject_entity/entityfields/reasons/possibleItemsProcess.js</possibleItemsProcess>
<searchable v="true" />
<selectionMode>MULTI</selectionMode>
<stateProcess>%aditoprj%/entity/Salesproject_entity/entityfields/reasons/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/reasons/valueProcess.js</valueProcess>
<displayValueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/reasons/displayValueProcess.js</displayValueProcess>
<onValueChangeTypes>
<element>MASK</element>
<element>PROCESS</element>
</onValueChangeTypes>
</entityField>
<entityProvider>
<name>Salesprojects</name>
......@@ -597,10 +599,6 @@
<name>PHASE.displayValue</name>
<expression>%aditoprj%/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/phase.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>REASONS.displayValue</name>
<expression>%aditoprj%/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/reasons.displayvalue/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>REASONS.value</name>
<recordfield>SALESPROJECT.REASONS</recordfield>
......
import("system.vars");
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.string(KeywordUtils.getViewValue($KeywordRegistry.salesprojectWonLost(), vars.get("$field.REASONS")));
\ No newline at end of file
import("system.logging");
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
result.object(KeywordUtils.getEntryNamesAndIdsByContainer("SalesprojectWonLost"));
\ No newline at end of file
import("system.neon");
import("system.result");
import("system.vars");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT || vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
// IDs: SalesprojectState Order and Lost
var state = vars.get("$field.STATE");
if(state && (state != 'd8a60f60-a4e6-46ee-88ec-bac53e1afedd' && state != '130bb53a-a97e-455e-8f34-8d445e985474'))
result.string("");
}
import("system.result");
import("Keyword_lib");
import("KeywordRegistry_basic");
import("Sql_lib");
var value = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.salesprojectWonLost(), "SALESPROJECT.REASONS");
result.string(value);
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.0">
<name>SalesprojectPreview_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<cardViewTemplate>
<name>Head</name>
<iconField>IMAGE</iconField>
<titleField>PROJECTTITLE</titleField>
<descriptionField>PROJECTCODE</descriptionField>
<favoriteAction1>newActivity</favoriteAction1>
<entityField>#ENTITY</entityField>
</cardViewTemplate>
<genericViewTemplate>
<name>Details</name>
<showDrawer v="true" />
<drawerCaption>Details</drawerCaption>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>f2b33601-12e8-463f-a920-6e1ae9745491</name>
<entityField>RELATION_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>4e3d7a37-f55b-4c18-9ba1-ab4ab0bbb442</name>
<entityField>STATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>2867e662-b824-4bbf-8eaf-bbd34f44598e</name>
<entityField>REASONS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ff0dcd67-56ec-4db1-8c53-531f22fda716</name>
<entityField>PHASE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>3164fe37-8ca0-44c0-bebe-b9573346fb72</name>
<entityField>STARTDATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>529e8b1f-014f-4b44-8bba-96869156ebf7</name>
<entityField>ENDDATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>0ba7dcb5-9606-4d74-8455-3423a16fd98a</name>
<entityField>PROBABILITY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>950d21a3-c0f9-4df5-9810-fa027a6fdb4a</name>
<entityField>VOLUME</entityField>
</entityFieldLink>
<entityFieldLink>
<name>bf7ecf7a-3d7f-4ec8-867a-c10ced346343</name>
<entityField>TIMETRACKINGSUM</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<genericViewTemplate>
<name>Info</name>
<showDrawer v="true" />
<drawerCaption>Further informations</drawerCaption>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>9fe11db5-ec66-4238-9c56-5ace055f1d90</name>
<entityField>INFO</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<neonViewReference>
<name>f3542270-e7bd-4f9f-b7c0-f6c5210bb337</name>
<entityField>MainDocuments</entityField>
<view>DocumentList_view</view>
</neonViewReference>
<scoreCardViewTemplate>
<name>AdditionalInfo</name>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>79490331-6be4-422f-9450-da0db56f0654</name>
<entityField>DAYS_NOTACTIVE</entityField>
</entityFieldLink>
</fields>
</scoreCardViewTemplate>
</children>
</neonView>
<?xml version="1.0" encoding="UTF-8"?>
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.0">
<name>SalesprojectPreview_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<layout>
<boxLayout>
<name>layout</name>
</boxLayout>
</layout>
<children>
<cardViewTemplate>
<name>Head</name>
<iconField>IMAGE</iconField>
<titleField>PROJECTTITLE</titleField>
<descriptionField>PROJECTCODE</descriptionField>
<favoriteAction1>newActivity</favoriteAction1>
<entityField>#ENTITY</entityField>
</cardViewTemplate>
<genericViewTemplate>
<name>Details</name>
<showDrawer v="true" />
<drawerCaption>Details</drawerCaption>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>f2b33601-12e8-463f-a920-6e1ae9745491</name>
<entityField>RELATION_ID</entityField>
</entityFieldLink>
<entityFieldLink>
<name>4e3d7a37-f55b-4c18-9ba1-ab4ab0bbb442</name>
<entityField>STATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>2867e662-b824-4bbf-8eaf-bbd34f44598e</name>
<entityField>REASONS</entityField>
</entityFieldLink>
<entityFieldLink>
<name>ff0dcd67-56ec-4db1-8c53-531f22fda716</name>
<entityField>PHASE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>3164fe37-8ca0-44c0-bebe-b9573346fb72</name>
<entityField>STARTDATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>529e8b1f-014f-4b44-8bba-96869156ebf7</name>
<entityField>ENDDATE</entityField>
</entityFieldLink>
<entityFieldLink>
<name>0ba7dcb5-9606-4d74-8455-3423a16fd98a</name>
<entityField>PROBABILITY</entityField>
</entityFieldLink>
<entityFieldLink>
<name>950d21a3-c0f9-4df5-9810-fa027a6fdb4a</name>
<entityField>VOLUME</entityField>
</entityFieldLink>
<entityFieldLink>
<name>bf7ecf7a-3d7f-4ec8-867a-c10ced346343</name>
<entityField>TIMETRACKINGSUM</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<genericViewTemplate>
<name>Info</name>
<showDrawer v="true" />
<drawerCaption>Further informations</drawerCaption>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>9fe11db5-ec66-4238-9c56-5ace055f1d90</name>
<entityField>INFO</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
<neonViewReference>
<name>f3542270-e7bd-4f9f-b7c0-f6c5210bb337</name>
<entityField>MainDocuments</entityField>
<view>DocumentList_view</view>
</neonViewReference>
<scoreCardViewTemplate>
<name>AdditionalInfo</name>
<entityField>#ENTITY</entityField>
<fields>
<entityFieldLink>
<name>79490331-6be4-422f-9450-da0db56f0654</name>
<entityField>DAYS_NOTACTIVE</entityField>
</entityFieldLink>
</fields>
</scoreCardViewTemplate>
</children>
</neonView>
import("system.logging");
import("system.vars");
import("system.SQLTYPES");
import("system.db");
......@@ -166,6 +167,28 @@ KeywordUtils.getEntryNamesByContainer = function(pContainerName)
return list;
};
/**
* provides a translated list of keyword-entry-titles and its ids in the system filtered by a containerName;
* usefull for lists where the key is the name which is then a editable displayValue
*
* @param {String} pContainerName name of the keyword container for filtering
*
* @return {String[]} translated titles as 1D-Array
*/
KeywordUtils.getEntryNamesAndIdsByContainer = function(pContainerName)
{
var sql = SqlCondition.begin()
.andPrepare("AB_KEYWORD_ENTRY.CONTAINER", pContainerName)
.buildSql("select AB_KEYWORD_ENTRY.AB_KEYWORD_ENTRYID, AB_KEYWORD_ENTRY.TITLE from AB_KEYWORD_ENTRY", null, "order by AB_KEYWORD_ENTRY.SORTING asc, AB_KEYWORD_ENTRY.TITLE asc")
var list = db.table(sql);
for(var i = 0; i<list.length; i = i + 1)
list[i][1] = translate.text(list[i][1]);
return list;
};
/**
* object that provides featrues for a single keyword attribute; initalizes itself on creation with a specific keyword-attribute
*
......
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