Table of Contents

TMS Event Function Line 11154639 Example Execute Function Set 1

General

The following Json-code can be copied to field:Execute Function Set on the Function Line 1: *When succeded and TripStatus =<40-SENT Set TripStatus: 40-SENT *

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": "511",
            "ValueFunctionSet": {
              "FunctionSet": {
                "TableNo": 11172786,
                "Entries": [
                  {
                    "EntryNo": "10000",
                    "CodeunitID": "11172846",
                    "FunctionCode": "SET STATUS",
                    "Description": "Documentstatus instellen",
                    "Parameters": [
                      {
                        "ParameterName": "NEW STATUS",
                        "Value": "40-SENT"
                      }
                    ]
                  }
                ]
              }
            }
          },
          {
            "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 Field Value: Trip No. ",
                    "Parameters": [
                      {
                        "ParameterName": "TABLENO",
                        "Value": "11172835"
                      },
                      {
                        "ParameterName": "FIELDNO",
                        "Value": "31"
                      },
                      {
                        "ParameterName": "FIELD 1",
                        "Value": "1"
                      },
                      {
                        "ParameterName": "FILTER 1",
                        "ResultFunctionSetID": {
                          "FunctionSet": {
                            "TableNo": 3,
                            "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"
          }
        ]
      }
    ]
  }
}