UserDefinedFieldGroup Examples

Query for All UDF Groups

Query for all user defined field categories

[
  {
    "Action": "Query",
    "QueryType": "UdfGroupAll",
    "DomainType": "Replicon.Domain.UserDefinedFields.Definition.UserDefinedFieldGroup",
    "Args": []
  }
]

Query for UDF Group

Query for user defined field category (User, Department, Client, etc).

[
  {
    "Action": "Query",
    "QueryType": "UdfGroupByName",
    "DomainType": "Replicon.Domain.UserDefinedFields.Definition.UserDefinedFieldGroup",
    "Args": [
      "User"
    ]
  }
]

Create/Update a Numeric Udf

Create a new numeric user defined field will all the available fields options, and then update it to change those set.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.UserDefinedFields.Definition.UserDefinedFieldGroup",
    "Identity": "23DDD9A0-A1D1-40f1-AEAA-2E04915F0DE8",
    "Operations": [
      {
        "__operation": "CreateNumericUdf",
        "Name": "RemoteApiNumeric",
        "Type": {
          "__type": "Replicon.Domain.UserDefinedFields.Definition.UdfType",
          "Identity": "Numeric"
        },
        "FieldIndex": 1,
        "Enabled": true,
        "Hidden": false,
        "Required": false,
        "MinValue": 0,
        "MaxValue": 10,
        "DecimalPlaces": 1,
        "DefaultValue": 8
      },
      {
        "__operation": "UpdateNumericUdf",
        "Name": "RemoteApiNumeric",
        "Enabled": true,
        "Required": false,
        "MinValue": 1,
        "MaxValue": 12,
        "DecimalPlaces": 2,
        "DefaultValue": 9
      }
    ]
  }
]

Create/Update a Text Udf

Create a new text user defined field will all the available fields options, and then update it to change those set.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.UserDefinedFields.Definition.UserDefinedFieldGroup",
    "Identity": "23DDD9A0-A1D1-40f1-AEAA-2E04915F0DE8",
    "Operations": [
      {
        "__operation": "CreateTextUdf",
        "Name": "RemoteApiText",
        "Type": {
          "__type": "Replicon.Domain.UserDefinedFields.Definition.UdfType",
          "Identity": "Text"
        },
        "FieldIndex": 2,
        "Enabled": true,
        "Hidden": false,
        "Required": false,
        "MaxLength": 40,
        "DefaultValue": "wonder"
      },
      {
        "__operation": "UpdateTextUdf",
        "Name": "RemoteApiText",
        "Enabled": true,
        "Required": false,
        "MaxLength": 50,
        "DefaultValue": "super wonder"
      }
    ]
  }
]

Create/Update a Date Udf

Create a new Date user defined field will all the available fields options, and then update it to change those set.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.UserDefinedFields.Definition.UserDefinedFieldGroup",
    "Identity": "23DDD9A0-A1D1-40f1-AEAA-2E04915F0DE8",
    "Operations": [
      {
        "__operation": "CreateDateUdf",
        "Name": "RemoteApiDate",
        "Type": {
          "__type": "Replicon.Domain.UserDefinedFields.Definition.UdfType",
          "Identity": "Date"
        },
        "FieldIndex": 3,
        "Enabled": true,
        "Hidden": false,
        "Required": false,
        "MinValue": {
          "__type": "Date",
          "Year": 2010,
          "Month": 10,
          "Day": 1
        },
        "MaxValue": {
          "__type": "Date",
          "Year": 2010,
          "Month": 12,
          "Day": 30
        },
        "DefaultValue": {
          "__type": "Date",
          "Year": 2010,
          "Month": 10,
          "Day": 30
        }
      },
      {
        "__operation": "UpdateDateUdf",
        "Name": "RemoteApiDate",
        "Enabled": true,
        "Required": false,
        "MinValue": {
          "__type": "Date",
          "Year": 2010,
          "Month": 1,
          "Day": 1
        },
        "MaxValue": {
          "__type": "Date",
          "Year": 2012,
          "Month": 12,
          "Day": 30
        },
        "DefaultValueIsToday": true
      }
    ]
  }
]

Create/Update a Drop Down Udf

Create a new drop down user defined field will all the available fields options, and then update it to change those set, including adding another drop down option, and replacing all drop down options, then remove a couple options.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.UserDefinedFields.Definition.UserDefinedFieldGroup",
    "Identity": "23DDD9A0-A1D1-40f1-AEAA-2E04915F0DE8",
    "Operations": [
      {
        "__operation": "CreateDropDownUdf",
        "Name": "RemoteApiDropDown",
        "Type": {
          "__type": "Replicon.Domain.UserDefinedFields.Definition.UdfType",
          "Identity": "DropDown"
        },
        "FieldIndex": 4,
        "Enabled": true,
        "Hidden": false,
        "Required": false,
        "DefaultValue": "three",
        "DropDownOptions": [
          "one",
          "two",
          "three",
          "four",
          "five"
        ]
      },
      {
        "__operation": "UpdateDropDownUdf",
        "Name": "RemoteApiDropDown",
        "Enabled": true,
        "Required": false,
        "DropDownOptions": [
          "Six"
        ],
        "DefaultValue": "one"
      },
      {
        "__operation": "UpdateDropDownUdf",
        "Name": "RemoteApiDropDown",
        "Enabled": true,
        "Required": false,
        "DropDownOptions": [
          "a",
          "b",
          "c",
          "d",
          "e",
          "f"
        ],
        "DropDownOptionsReplace": true
      },
      {
        "__operation": "RemoveDropDownUdfOption",
        "Name": "RemoteApiDropDown",
        "DropDownOptions": [
          "b",
          "c"
        ]
      }
    ]
  }
]