Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab Maintenance 28.03.2025 | 20:00 - 23:00 MEZ
Show more breadcrumbs
xrm
basic
Commits
c1f426f7
Commit
c1f426f7
authored
6 years ago
by
Johannes Hörmann
Browse files
Options
Downloads
Plain Diff
Merge origin/master
parents
20dc61db
8c82b802
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
entity/Product_entity/entityfields/relation_id/linkedContextProcess.js
+2
-1
2 additions, 1 deletion
...t_entity/entityfields/relation_id/linkedContextProcess.js
entity/Task_entity/onValidation.js
+9
-10
9 additions, 10 deletions
entity/Task_entity/onValidation.js
with
11 additions
and
11 deletions
entity/Product_entity/entityfields/relation_id/linkedContextProcess.js
+
2
−
1
View file @
c1f426f7
...
...
@@ -2,4 +2,5 @@ import("system.vars");
import
(
"
system.result
"
);
import
(
"
Relation_lib
"
);
result
.
string
(
"
Org_context
"
);
\ No newline at end of file
if
(
vars
.
get
(
"
$field.RELATION_ID
"
))
result
.
string
(
"
Org_context
"
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
entity/Task_entity/onValidation.js
+
9
−
10
View file @
c1f426f7
...
...
@@ -4,13 +4,12 @@ import("system.text");
import
(
"
system.neon
"
);
import
(
"
Sql_lib
"
);
//TODO: crashes server
//if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
//{
// var maskingHelper = new SqlMaskingUtils();
// var newCodeNumber = db.cell("select " + maskingHelper.max("TASK.CODE") + " from TASK");
// newCodeNumber = Number(newCodeNumber);//if no number exists till no, start value will be 1 (due to: ++0)
// if (isNaN(newCodeNumber))
// throw new TypeError();//TODO:add Message
// neon.setFieldValue("$field.CODE", text.formatLong(++newCodeNumber, "0000000"));
//}
\ No newline at end of file
if
(
vars
.
get
(
"
$sys.recordstate
"
)
==
neon
.
OPERATINGSTATE_NEW
)
{
var
maskingHelper
=
new
SqlMaskingUtils
();
var
newCodeNumber
=
db
.
cell
(
"
select
"
+
maskingHelper
.
max
(
"
TASK.CODE
"
)
+
"
from TASK
"
);
newCodeNumber
=
Number
(
newCodeNumber
);
//if no number exists till no, start value will be 1 (due to: ++0)
if
(
isNaN
(
newCodeNumber
))
throw
new
TypeError
();
//TODO:add Message
neon
.
setFieldValue
(
"
$field.CODE
"
,
++
newCodeNumber
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment