Table of Contents

TMS Event Function Line 11154639 Example Execute Function Set 3

General

The following Json-code can be copied to field:Execute Function Set on the Function Line 3: When failed set TripStatus: 31-SENDERROR

Note

Check the values used in the function. In each environment specific criteria may be applicable.

Functional


{
  "FunctionSet": {
    "TableNo": 11173073,
    "DataType": "34047",
    "Entries": [
      {
        "EntryNo": "10000",
        "CodeunitID": "11172846",
        "FunctionCode": "REF",
        "Parameters": [
          {
            "ParameterName": "TABLENO",
            "Value": "11172786"
          },
          {
            "ParameterName": "FUNCTION SET",
            "Value": "491",
            "ValueFunctionSet": {
              "FunctionSet": {
                "TableNo": 11172786,
                "Entries": [
                  {
                    "EntryNo": "10000",
                    "CodeunitID": "11172846",
                    "FunctionCode": "SET STATUS",
                    "Description": "Set documentstatus: 31-SENDERROR",
                    "Parameters": [
                      {
                        "ParameterName": "NEW STATUS",
                        "Value": "31-SENDERROR"
                      }
                    ]
                  }
                ]
              }
            }
          },
          {
            "ParameterName": "WHICH",
            "Value": "-"
          },
          {
            "ParameterName": "FIELD 1",
            "Value": "1"
          },
          {
            "ParameterName": "FILTER 1",
            "Value": "6"
          },
          {
            "ParameterName": "FIELD 2",
            "Value": "2"
          },
          {
            "ParameterName": "FILTER 2",
            "ResultFunctionSetID": {
              "FunctionSet": {
                "TableNo": 11173073,
                "DataType": "34047",
                "Entries": [
                  {
                    "EntryNo": "30000",
                    "CodeunitID": "11172846",
                    "FunctionCode": "GET",
                    "Description": "Get: Trip No.",
                    "Parameters": [
                      {
                        "ParameterName": "TABLENO",
                        "Value": "11172835"
                      },
                      {
                        "ParameterName": "FIELDNO",
                        "Value": "31"
                      },
                      {
                        "ParameterName": "FIELD 1",
                        "Value": "1"
                      },
                      {
                        "ParameterName": "FILTER 1",
                        "ResultFunctionSetID": {
                          "FunctionSet": {
                            "TableNo": 11173073,
                            "DataType": "31488",
                            "Entries": [
                              {
                                "EntryNo": "10000",
                                "CodeunitID": "11172846",
                                "FunctionCode": "COPYSTR",
                                "Description": "Copy String: Processing Record-Id",
                                "Parameters": [
                                  {
                                    "ParameterName": "TEXT",
                                    "ResultFunctionSetID": {
                                      "FunctionSet": {
                                        "TableNo": 11173073,
                                        "DataType": "31488",
                                        "Entries": [
                                          {
                                            "EntryNo": "10000",
                                            "CodeunitID": "11172846",
                                            "FunctionCode": "FIELD",
                                            "Description": "Get Field Value: Processing Record-Id",
                                            "Parameters": [
                                              {
                                                "ParameterName": "FIELDNO",
                                                "Value": "70"
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  {
                                    "ParameterName": "POSITION",
                                    "Value": "23"
                                  },
                                  {
                                    "ParameterName": "LENGTH",
                                    "Value": "40"
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      },
                      {
                        "ParameterName": "FINDWHAT",
                        "Value": "1"
                      },
                      {
                        "ParameterName": "READ ISOLATION",
                        "Value": "1"
                      }
                    ]
                  }
                ]
              }
            }
          },
          {
            "ParameterName": "FILTER 3"
          },
          {
            "ParameterName": "READ ISOLATION",
            "Value": "1"
          }
        ]
      }
    ]
  }
}