-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreateCase.js
55 lines (51 loc) · 1.44 KB
/
createCase.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
'use strict'
var p360 = require('../index')
var config = require('../config')
var clientService = 'CaseService'
var clientMethod = 'CreateCase'
var args = {
'parameter': {
'Title': 'Sakstittel',
'UnofficialTitle': 'Uoffisiell sakstittel',
'Status': 'B', // Under behandling
'SubArchive': '200052', // Codetable: Noark subarchive
'AccessCode': '13', // Codetable: Accesscode
'AccessGroup': 'Gruppenavn', // Tilgangsgruppe navn
'Paragraph': 'Offl §13 jfr Fvl §13', // Codetable: Paragraph
'ArchiveCodes': [
{
'Sort': '1',
'ArchiveType': 'FAGKODE PRINSIPP', // Codetable: Noark classification
'ArchiveCode': 'N06' // Codetable: Noark classification code
},
{
'Sort': '2',
'ArchiveType': 'Fnr', // Codetable: Noark classification
'ArchiveCode': '14059733381',
'IsManualText': 'False'
}
],
'Keywords': 'Stikkord',
'Contacts': [
{
'ReferenceNumber': '14059733381',
'Role': '9' // Codetable: Contact - Case Role
}
],
'ResponsiblePersonIdNumber': '',
'ResponsibleEnterpriseRecno': '213419' // Recnr ansvarlig virksomhet
}
}
var options = {
'p360': config.p360,
'clientService': clientService,
'clientMethod': clientMethod,
'args': args
}
p360(options, function (error, data) {
if (error) {
console.error(JSON.stringify(error))
} else {
console.log(JSON.stringify(data, null, 4))
}
})