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
Show more breadcrumbs
xrm
basic
Commits
b4a0e9fa
Commit
b4a0e9fa
authored
4 years ago
by
Sebastian Pongratz
Browse files
Options
Downloads
Patches
Plain Diff
#1060627-LeadimportMappingassistent Lib Documentation
parent
595be8f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
process/Leadimport_lib/process.js
+11
-1
11 additions, 1 deletion
process/Leadimport_lib/process.js
with
11 additions
and
1 deletion
process/Leadimport_lib/process.js
+
11
−
1
View file @
b4a0e9fa
...
...
@@ -153,6 +153,7 @@ LeadImportUtils.loadImportFile = function(pBinId, pFieldSep, pFieldLimit, pRecor
*/
LeadImportUtils
.
importData
=
function
(
pDataFields
,
pDataTypes
,
pFieldDef
,
pFieldValues
,
pImportDefID
,
pAttrObject
,
pSource
,
pUser
,
pDate
)
{
// set the mappings
LeadImportUtils
.
mapping
=
LeadImportUtils
.
getMapping
(
pImportDefID
);
var
LeadValues
=
LeadImportUtils
.
setValues
(
pDataFields
[
"
LEAD
"
],
pFieldDef
,
pFieldValues
);
// set the Lead values
...
...
@@ -222,6 +223,14 @@ LeadImportUtils.importData = function(pDataFields, pDataTypes, pFieldDef, pField
return
[
leadId
,
persForDubCheck
,
orgsForDubCheck
];
}
/**
* get all Mapping to a Leadimport
*
* @param {String} pleadimportId the ID of a Leadimport
*
* @return {Object} an associative array in format arr[fieldname][inputvalue] --> outputvalue
*/
LeadImportUtils
.
getMapping
=
function
(
pleadimportId
)
{
let
tempData
=
{};
...
...
@@ -230,7 +239,7 @@ LeadImportUtils.getMapping = function(pleadimportId)
.
where
(
"
LEADIMPORTMAPPINGASSISTANT.LEADIMPORT_ID
"
,
pleadimportId
)
.
table
().
forEach
(
function
(
d
)
{
if
(
tempData
[
d
[
0
]]
==
undefined
)
tempData
[
d
[
0
]]
=
{}
//[[d[1], d[2]]]
tempData
[
d
[
0
]]
=
{}
tempData
[
d
[
0
]][
d
[
1
]]
=
d
[
2
];
});
return
tempData
;
...
...
@@ -325,6 +334,7 @@ LeadImportUtils.setValues = function(pFields, pFieldDef, pFieldValues)
LeadImportUtils
.
mapping
[
pFieldDef
[
i
][
1
]]
!=
undefined
&&
LeadImportUtils
.
mapping
[
pFieldDef
[
i
][
1
]][
pFieldValues
[
pFieldDef
[
i
][
0
]]]
!=
undefined
)
{
// mapping is available and is set
pFieldValues
[
pFieldDef
[
i
][
0
]]
=
LeadImportUtils
.
mapping
[
pFieldDef
[
i
][
1
]][
pFieldValues
[
pFieldDef
[
i
][
0
]]];
}
...
...
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