URL: /DMProfile/Update

Method: POST

Descrizione

Questo metodo consente di inserire un profilo nel db di Docs Marshal, inizializzando i valori di sistema e i field aggiuntivi descritti nella relativa classe documentale.

Formato richieste

Legenda:
Parametro obbligatorio
Parametro opzionale
{
    'sessionID': SID,
    'ObjectId': objectID,
    'ProfileForUpdate':
    {
        'RaiseWorkflowEvents': true / false,
        'DomainExternalID': 'domain',
        'ClassTypeExternalID': 'class type',
        'ObjectStateId': 4,
        'ObjectStateExternalID': 'state',
        'LanguageCode': 'lang',
        'Fields':
        [
            {
                'ExternalID': 'field external id',
                'Value': 'field value',
                'ValueType': 'Int/String/Date/DateTime/Decimal/ByteArray/MultiLanguage/Boolean/Guid',
                'ValueFormat': 'yyyy-MM-dd',
                'ValueCultureInfoName': 'it-IT'
            },
            {...},
            {...}
        ]
    }
}

Note

  • RaiseWorkflowEvents: normalmente true. Se settato a false non verranno scatenati gli eventi di workflow collegati all'inserimento.
  • ValueFormat: se ValueType รจ Date o DateTime, definisce il formato utilizzato. Vedere la pagina MSDN per i dettagli.
  • ValueCultureInfoName: influisce sul modo in cui i valori numerici vengono parsati.

Formato risposte

{
    'result':
    {
        "HasError": false,
        "Error": ""
        "Profile":
        {
            "ObjectId": "080185b8-ac8a-443a-afdc-755f9b64315f",
            "LastUpdate": "/Date(1456495621304)/",
            "ObjectStateId": 24,
            "Version": 0,
            "UserId": 154,
            "DomainId": 11,
            "ClassTypeId": 155,
            "LanguageId": null,
            "ObjectState": "testState",
            "Domain": "testDomain",
            "ClassType": "testClassType",
            "InsertDt": "/Date(-62135596800000)/",
            "Protocol": null,
            "ObjectState_ExternalId": null,
            "Domain_ExternalId": null,
            "ClassType_ExternalId": null,
            "Fields": 
            [
                {
                    "Value": "test",
                    "MaxSize": null,
                    "Id": 887,
                    "Name": "testStringa",
                    "Description": null,
                    "ExternalId": "testStringaId",
                    "GenericValue": "test",
                    "AllowNull": false,
                    "FieldType": 1
                },
                {...},
                {...}
            ]
      }
}