Skip to content
Snippets Groups Projects
Commit e28d26ef authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon:
Browse files

Merge branch 'sales_2001938_visitplan_edit' into '2021.2'

[Projekt: xRM-Sales][TicketNr.: 2001938][VisitPlanEmployeeWeekEdit_view: Jahr wird nicht angezeigt]

See merge request xrm/basic!1476
parents 73f99911 537e9c7a
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,6 @@
<groupable v="true" />
<mandatory v="true" />
<dropDownProcess>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/week/dropDownProcess.js</dropDownProcess>
<stateProcess>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/week/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/week/valueProcess.js</valueProcess>
<onValidation>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/week/onValidation.js</onValidation>
</entityField>
......@@ -145,7 +144,6 @@
<contentType>DATE</contentType>
<resolution>YEAR</resolution>
<mandatory v="true" />
<stateProcess>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/yearselection/stateProcess.js</stateProcess>
<valueProcess>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/yearselection/valueProcess.js</valueProcess>
<onValueChange>%aditoprj%/entity/VisitPlanEmployeeWeek_entity/entityfields/yearselection/onValueChange.js</onValueChange>
</entityField>
......
import("system.result");
import("system.neon");
import("system.vars");
var state = neon.COMPONENTSTATE_EDITABLE;
if(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW)
{
state = neon.COMPONENTSTATE_DISABLED;
}
result.string(state);
\ No newline at end of file
......@@ -5,4 +5,4 @@ import("system.vars");
var dateValue = vars.get("$this.value");
var year = datetime.toDate(dateValue, "yyyy");
neon.setFieldValue("$field.YEAR", year);
\ No newline at end of file
neon.setFieldValue("$field.YEAR", year);
import("system.result");
import("system.neon");
import("system.vars");
var state = neon.COMPONENTSTATE_EDITABLE;
if(vars.get("$sys.recordstate") != neon.OPERATINGSTATE_NEW)
{
state = neon.COMPONENTSTATE_DISABLED;
}
result.string(state);
\ No newline at end of file
......@@ -2,7 +2,15 @@ import("system.neon");
import("system.result");
import("system.vars");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$this.value"))
{
result.string(vars.get("$sys.date"));
}
\ No newline at end of file
if(vars.get("$this.value") == null)
{
var recordstate = vars.get("$sys.recordstate")
if(recordstate == neon.OPERATINGSTATE_NEW)
{
result.string(vars.get("$sys.date"));
}
else if(recordstate == neon.OPERATINGSTATE_EDIT)
{
result.string(new Date(vars.get("$field.YEAR")).getTime());
}
}
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