Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
77 stars 83 forks source link

Fin & Ops connector adding required fields that do not exist on the entity #4689

Closed hardEight closed 6 months ago

hardEight commented 6 months ago

Describe the Bug with repro steps

In the Fin & Ops connector for Dynamics365 F&O, the new UI is adding required fields that make the calls to the entity fail. The EmploymentLegalEntityId is showing as required. This is happening with the entities VendorsV2 and PersonIdentificationNumbers. When it is filled while sending data the call fails with the following error: { "status": 400, "message": "An error has occurred. Exception has been thrown by the target of an invocation. The property 'EmploymentLegalEntityId' does not exist on type 'Microsoft.Dynamics.DataEntities.PersonIdentificationNumber'. Make sure to only use property names that are defined by the type.\r\nclientRequestId: f447baf5-80dc-4f29-9fca-192088827849", "error": { "message": "An error has occurred. Exception has been thrown by the target of an invocation. The property 'EmploymentLegalEntityId' does not exist on type 'Microsoft.Dynamics.DataEntities.PersonIdentificationNumber'. Make sure to only use property names that are defined by the type." }, "source": "stellar-fo.operations.dynamics.com", "errors": [] } image

New UI: image

Same field in the Legacy designer(Different entity but same thing): image

What type of Logic App Is this happening in?

Consumption (Portal)

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

{
  "definition": {
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "contentVersion": "1.0.0.0",
    "staticResults": {
      "AddToConcur1": {
        "status": "Succeeded",
        "outputs": {
          "headers": {},
          "statusCode": "OK"
        }
      }
    },
    "triggers": {
      "Recurrence": {
        "type": "Recurrence",
        "recurrence": {
          "frequency": "Day",
          "interval": 1,
          "schedule": {
            "hours": [
              "0"
            ],
            "minutes": [
              30
            ]
          },
          "timeZone": "Eastern Standard Time"
        }
      }
    },
    "actions": {
      "CheckForRecords": {
        "type": "If",
        "expression": {
          "and": [
            {
              "equals": [
                "@empty(body('GetEmpRecords'))",
                "@false"
              ]
            }
          ]
        },
        "actions": {
          "ForEachRecord": {
            "type": "Foreach",
            "foreach": "@body('GetEmpRecords')",
            "actions": {
              "NewHireCodeCheck": {
                "type": "If",
                "expression": {
                  "and": [
                    {
                      "equals": [
                        "@items('ForEachRecord')?['jobChangeReasonCode']",
                        "@string('100')"
                      ]
                    }
                  ]
                },
                "actions": {
                  "EEScope": {
                    "type": "Scope",
                    "actions": {
                      "Condition_2": {
                        "type": "If",
                        "expression": {
                          "and": [
                            {
                              "equals": [
                                "@empty(body('GetEmpData'))",
                                "@false"
                              ]
                            }
                          ]
                        },
                        "actions": {
                          "For_each_Get_Employee_Data": {
                            "type": "Foreach",
                            "foreach": "@body('GetEmpData')",
                            "actions": {
                              "Create_record_in_D365_EmployeesV2": {
                                "type": "ApiConnection",
                                "inputs": {
                                  "host": {
                                    "connection": {
                                      "name": "@parameters('$connections')['dynamicsax-1']['connectionId']"
                                    }
                                  },
                                  "method": "post",
                                  "body": {
                                    "EmploymentLegalEntityId": "@{items('ForEachRecord')?['orgLevel1Code']}",
                                    "PersonnelNumber": "@{items('ForEachRecord')?['employeeNumber']}",
                                    "AddressState": "@{items('For_each_Get_Employee_Data')?['addressState']}",
                                    "AddressCity": "@items('For_each_Get_Employee_Data')?['addressCity']",
                                    "AddressZipCode": "@items('For_each_Get_Employee_Data')?['addressZipCode']",
                                    "LastName": "@items('For_each_Get_Employee_Data')?['lastName']",
                                    "AddressStreet": "@items('For_each_Get_Employee_Data')?['addressLine1']",
                                    "DimensionDisplayValue": "-@{items('ForEachRecord')?['orgLevel4Code']}--",
                                    "AddressCountryRegionId": "@items('For_each_Get_Employee_Data')?['addressCountry']",
                                    "AddressNameDescription": "@{items('For_each_Get_Employee_Data')?['firstName']} @{items('For_each_Get_Employee_Data')?['lastName']}",
                                    "MiddleName": "@items('For_each_Get_Employee_Data')?['middleName']",
                                    "FirstName": "@items('For_each_Get_Employee_Data')?['firstName']",
                                    "ProfessionalTitle": "@{items('ForEachRecord')?['jobDescription']}"
                                  },
                                  "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('D365')))}/tables/@{encodeURIComponent(encodeURIComponent('EmployeesV2'))}/items"
                                }
                              },
                              "Delay_45_seconds": {
                                "type": "Wait",
                                "inputs": {
                                  "interval": {
                                    "count": 45,
                                    "unit": "Second"
                                  }
                                },
                                "runAfter": {
                                  "Create_record_in_D365_EmployeesV2": [
                                    "Succeeded"
                                  ]
                                }
                              },
                              "For_each_3": {
                                "type": "Foreach",
                                "foreach": "@body('Get_record_just_created')?['value']",
                                "actions": {
                                  "AddToConcur": {
                                    "type": "Http",
                                    "inputs": {
                                      "uri": "https://prod-78.eastus.logic.azure.com:443/workflows/a6c000c3b601474ba317f68fe1d24c56/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=e8HEIYHr-eH_0Ar1B61SahM25PfvUkdJZnYh3mgq0xo",
                                      "method": "POST",
                                      "body": {
                                        "Active": "@true",
                                        "Company": "@{items('ForEachRecord')?['orgLevel1Code']}",
                                        "EEID": "@{items('ForEachRecord')?['employeeNumber']}"
                                      }
                                    },
                                    "runAfter": {
                                      "Create_PersonIdentificationNumbers_record": [
                                        "Succeeded"
                                      ]
                                    },
                                    "runtimeConfiguration": {
                                      "staticResult": {
                                        "staticResultOptions": "Disabled",
                                        "name": "AddToConcur1"
                                      }
                                    }
                                  },
                                  "Condition": {
                                    "type": "If",
                                    "expression": {
                                      "and": [
                                        {
                                          "not": {
                                            "equals": [
                                              "@variables('NumberSeq')",
                                              "Exempt"
                                            ]
                                          }
                                        }
                                      ]
                                    },
                                    "actions": {
                                      "CreateHomeVendorRecord": {
                                        "type": "ApiConnection",
                                        "inputs": {
                                          "host": {
                                            "connection": {
                                              "name": "@parameters('$connections')['dynamicsax-1']['connectionId']"
                                            }
                                          },
                                          "method": "post",
                                          "body": {
                                            "EmploymentLegalEntityId": "",
                                            "PersonFirstName": "@items('For_each_Get_Employee_Data')?['firstName']",
                                            "PersonLastName": "@items('For_each_Get_Employee_Data')?['lastName']",
                                            "PersonMiddleName": "@items('For_each_Get_Employee_Data')?['middleName']",
                                            "SalesTaxGroupCode": "NonTax",
                                            "VendorAccountNumber": "@{items('ForEachRecord')?['employeeNumber']}",
                                            "VendorGroupId": "Employee",
                                            "VendorPartyNumber": "@items('For_each_3')?['PartyNumber']",
                                            "WithholdingTaxVendorType": "Individual",
                                            "dataAreaId": "@{items('ForEachRecord')?['orgLevel1Code']}"
                                          },
                                          "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('D365')))}/tables/@{encodeURIComponent(encodeURIComponent('VendorsV2'))}/items"
                                        },
                                        "runAfter": {
                                          "SetNumSeqHome": [
                                            "Succeeded"
                                          ]
                                        }
                                      },
                                      "ResetNumSeqHome": {
                                        "type": "ApiConnection",
                                        "inputs": {
                                          "host": {
                                            "connection": {
                                              "name": "@parameters('$connections')['dynamicsax-1']['connectionId']"
                                            }
                                          },
                                          "method": "patch",
                                          "body": {
                                            "NumberSequenceCode": "@variables('NumberSeq')",
                                            "ScopeType": "DataArea",
                                            "ScopeValue": "@{items('ForEachRecord')?['orgLevel1Code']}",
                                            "Continuous": "Yes",
                                            "Manual": "No"
                                          },
                                          "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('D365')))}/tables/@{encodeURIComponent(encodeURIComponent('SequenceV2Tables'))}/items/@{encodeURIComponent(encodeURIComponent(variables('NumberSeq'),',DataArea,',items('ForEachRecord')?['orgLevel1Code']))}"
                                        },
                                        "runAfter": {
                                          "CreateHomeVendorRecord": [
                                            "Succeeded",
                                            "TimedOut",
                                            "Skipped",
                                            "Failed"
                                          ]
                                        }
                                      },
                                      "SetNumSeqHome": {
                                        "type": "ApiConnection",
                                        "inputs": {
                                          "host": {
                                            "connection": {
                                              "name": "@parameters('$connections')['dynamicsax-1']['connectionId']"
                                            }
                                          },
                                          "method": "patch",
                                          "body": {
                                            "NumberSequenceCode": "@variables('NumberSeq')",
                                            "ScopeType": "DataArea",
                                            "ScopeValue": "@{items('ForEachRecord')?['orgLevel1Code']}",
                                            "Continuous": "No",
                                            "Manual": "Yes"
                                          },
                                          "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('D365')))}/tables/@{encodeURIComponent(encodeURIComponent('SequenceV2Tables'))}/items/@{encodeURIComponent(encodeURIComponent(variables('NumberSeq'),',DataArea,',items('ForEachRecord')?['orgLevel1Code']))}"
                                        }
                                      }
                                    },
                                    "else": {
                                      "actions": {}
                                    },
                                    "runAfter": {
                                      "ResetNumSeq1000": [
                                        "Succeeded"
                                      ]
                                    }
                                  },
                                  "CreateVendorRecord1000": {
                                    "type": "ApiConnection",
                                    "inputs": {
                                      "host": {
                                        "connection": {
                                          "name": "@parameters('$connections')['dynamicsax-1']['connectionId']"
                                        }
                                      },
                                      "method": "post",
                                      "body": {
                                        "EmploymentLegalEntityId": "",
                                        "PersonFirstName": "@items('For_each_Get_Employee_Data')?['firstName']",
                                        "PersonLastName": "@items('For_each_Get_Employee_Data')?['lastName']",
                                        "PersonMiddleName": "@items('For_each_Get_Employee_Data')?['middleName']",
                                        "SalesTaxGroupCode": "NonTax",
                                        "VendorAccountNumber": "@{items('ForEachRecord')?['employeeNumber']}",
                                        "VendorGroupId": "Employee",
                                        "VendorPartyNumber": "@items('For_each_3')?['PartyNumber']",
                                        "WithholdingTaxVendorType": "Individual",
                                        "dataAreaId": "1000"
                                      },
                                      "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('D365')))}/tables/@{encodeURIComponent(encodeURIComponent('VendorsV2'))}/items"
                                    },
                                    "runAfter": {
                                      "SetNumSeq1000": [
                                        "Succeeded"
                                      ]
                                    }
                                  },
                                  "Create_PersonIdentificationNumbers_record": {
                                    "type": "ApiConnection",
                                    "inputs": {
                                      "host": {
                                        "connection": {
                                          "name": "@parameters('$connections')['dynamicsax-1']['connectionId']"
                                        }
                                      },
                                      "method": "post",
                                      "body": {
                                        "EmploymentLegalEntityId": "",
                                        "PartyNumber": "@items('For_each_3')?['PartyNumber']",
                                        "IdentificationNumber": "@items('For_each_Get_Employee_Data')?['employeeID']",
                                        "IdentificationTypeId": "UKG",
                                        "VendorGroupId": "EMPLOYEE"
                                      },
                                      "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('D365')))}/tables/@{encodeURIComponent(encodeURIComponent('PersonIdentificationNumbers'))}/items"
                                    }
                                  },
                                  "ResetNumSeq1000": {
                                    "type": "ApiConnection",
                                    "inputs": {
                                      "host": {
                                        "connection": {
                                          "name": "@parameters('$connections')['dynamicsax-1']['connectionId']"
                                        }
                                      },
                                      "method": "patch",
                                      "body": {
                                        "NumberSequenceCode": "Acco_392",
                                        "ScopeType": "DataArea",
                                        "ScopeValue": "1000",
                                        "Continuous": "Yes",
                                        "Manual": "No"
                                      },
                                      "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('D365')))}/tables/@{encodeURIComponent(encodeURIComponent('SequenceV2Tables'))}/items/@{encodeURIComponent(encodeURIComponent('Acco_392,DataArea,1000'))}"
                                    },
                                    "runAfter": {
                                      "CreateVendorRecord1000": [
                                        "Succeeded"
                                      ]
                                    }
                                  },
                                  "SetNumSeq1000": {
                                    "type": "ApiConnection",
                                    "inputs": {
                                      "host": {
                                        "connection": {
                                          "name": "@parameters('$connections')['dynamicsax-1']['connectionId']"
                                        }
                                      },
                                      "method": "patch",
                                      "body": {
                                        "NumberSequenceCode": "Acco_392",
                                        "ScopeType": "DataArea",
                                        "ScopeValue": "1000",
                                        "Continuous": "No",
                                        "Manual": "Yes"
                                      },
                                      "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('D365')))}/tables/@{encodeURIComponent(encodeURIComponent('SequenceV2Tables'))}/items/@{encodeURIComponent(encodeURIComponent('Acco_392,DataArea,1000'))}"
                                    },
                                    "runAfter": {
                                      "AddToConcur": [
                                        "Succeeded"
                                      ]
                                    }
                                  }
                                },
                                "runAfter": {
                                  "Get_record_just_created": [
                                    "Succeeded"
                                  ]
                                }
                              },
                              "Get_record_just_created": {
                                "type": "ApiConnection",
                                "inputs": {
                                  "host": {
                                    "connection": {
                                      "name": "@parameters('$connections')['dynamicsax-1']['connectionId']"
                                    }
                                  },
                                  "method": "get",
                                  "path": "/datasets/@{encodeURIComponent(encodeURIComponent(parameters('D365')))}/tables/@{encodeURIComponent(encodeURIComponent('EmployeesV2'))}/items",
                                  "queries": {
                                    "$filter": "PersonnelNumber eq '@{body('Create_record_in_D365_EmployeesV2')?['PersonnelNumber']}'",
                                    "$top": 1
                                  },
                                  "retryPolicy": {
                                    "type": "fixed",
                                    "count": 3,
                                    "interval": "PT1M"
                                  }
                                },
                                "runAfter": {
                                  "Delay_45_seconds": [
                                    "Succeeded"
                                  ]
                                }
                              }
                            },
                            "runAfter": {
                              "NumberSequence": [
                                "Succeeded"
                              ]
                            }
                          },
                          "NumberSequence": {
                            "type": "If",
                            "expression": {
                              "or": [
                                {
                                  "equals": [
                                    "@items('ForEachRecord')?['orgLevel1Code']",
                                    "1300"
                                  ]
                                },
                                {
                                  "equals": [
                                    "@items('ForEachRecord')?['orgLevel1Code']",
                                    "2000"
                                  ]
                                },
                                {
                                  "equals": [
                                    "@items('ForEachRecord')?['orgLevel1Code']",
                                    "2500"
                                  ]
                                }
                              ]
                            },
                            "actions": {
                              "SetNumSeqByCompany": {
                                "type": "Switch",
                                "expression": "@items('ForEachRecord')?['orgLevel1Code']",
                                "default": {
                                  "actions": {}
                                },
                                "cases": {
                                  "1300": {
                                    "actions": {
                                      "Set_variable": {
                                        "type": "SetVariable",
                                        "inputs": {
                                          "name": "NumberSeq",
                                          "value": "Acco_393"
                                        }
                                      }
                                    },
                                    "case": "1300"
                                  },
                                  "2000": {
                                    "actions": {
                                      "Set_variable_2": {
                                        "type": "SetVariable",
                                        "inputs": {
                                          "name": "NumberSeq",
                                          "value": "Acco_394"
                                        }
                                      }
                                    },
                                    "case": "2000"
                                  },
                                  "2500": {
                                    "actions": {
                                      "Set_variable_3": {
                                        "type": "SetVariable",
                                        "inputs": {
                                          "name": "NumberSeq",
                                          "value": "Acco_398"
                                        }
                                      }
                                    },
                                    "case": "2500"
                                  }
                                }
                              }
                            },
                            "else": {
                              "actions": {
                                "Set_variable_4": {
                                  "type": "SetVariable",
                                  "inputs": {
                                    "name": "NumberSeq",
                                    "value": "Exempt"
                                  }
                                }
                              }
                            },
                            "runAfter": {
                              "UpdateTable": [
                                "Succeeded"
                              ]
                            }
                          },
                          "UpdateTable": {
                            "type": "AppendToStringVariable",
                            "inputs": {
                              "name": "varTable",
                              "value": "<tr>\n<td>@{concat(body('GetEmpData')[0]?['firstName'], ' ', body('GetEmpData')[0]?['lastName'])}</td>\n<td>@{items('ForEachRecord')?['jobDescription']}</td>\n<td>@{items('ForEachRecord')?['orgLevel4Code']} @{body('GetBUText')['description']}</td>\n<td>@{concat(items('ForEachRecord')?['supervisorFirstName'], ' ', items('ForEachRecord')?['supervisorLastName'])}</td>\n<td>@{formatDateTime(items('ForEachRecord')?['dateInJob'], 'yyyy-MM-dd')}</td>\n<td>@{items('ForEachRecord')?['employeeNumber']}</td>\n</tr>"
                            }
                          }
                        },
                        "else": {
                          "actions": {}
                        },
                        "runAfter": {
                          "GetEmpData": [
                            "Succeeded"
                          ]
                        }
                      },
                      "GetBUText": {
                        "type": "Http",
                        "inputs": {
                          "uri": "@{parameters('UKGURL')}/configuration/v1/org-levels/4/@{items('ForEachRecord')?['orgLevel4Code']}",
                          "method": "GET",
                          "headers": {
                            "Authorization": "@parameters('UKGPProCreds')",
                            "Content-Type": "application/json",
                            "US-Customer-Api-Key": "@parameters('UKGProAppKey')"
                          }
                        },
                        "runAfter": {
                          "SetNewHireFound": [
                            "Succeeded"
                          ]
                        }
                      },
                      "GetEmpData": {
                        "type": "Http",
                        "inputs": {
                          "uri": "@{parameters('UKGURL')}/personnel/v1/employee-demographic-details",
                          "method": "GET",
                          "headers": {
                            "Authorization": "@parameters('UKGPProCreds')",
                            "Content-Type": "application/json",
                            "US-Customer-Api-Key": "@parameters('UKGProAppKey')"
                          },
                          "queries": {
                            "employeeId": "@{items('ForEachRecord')?['employeeId']}"
                          }
                        },
                        "runAfter": {
                          "GetBUText": [
                            "Succeeded"
                          ]
                        }
                      },
                      "SetNewHireFound": {
                        "type": "SetVariable",
                        "inputs": {
                          "name": "NewHireFound",
                          "value": "@true"
                        }
                      }
                    },
                    "runAfter": {
                      "LogEachNewHire": [
                        "Succeeded"
                      ]
                    }
                  },
                  "LogEachEmpFailed": {
                    "type": "ApiConnection",
                    "inputs": {
                      "host": {
                        "connection": {
                          "name": "@parameters('$connections')['sql-2']['connectionId']"
                        }
                      },
                      "method": "post",
                      "body": {
                        "LoadLogKey": "@body('LogEachNewHire')?['outputparameters']?['LoadLogKey']"
                      },
                      "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent(parameters('LoggingServer')))},@{encodeURIComponent(encodeURIComponent(parameters('LoggingDB')))}/procedures/@{encodeURIComponent(encodeURIComponent('[stage].[IntegrationLogFailure]'))}"
                    },
                    "runAfter": {
                      "EEScope": [
                        "Failed"
                      ]
                    }
                  },
                  "LogEachEmpSuccess": {
                    "type": "ApiConnection",
                    "inputs": {
                      "host": {
                        "connection": {
                          "name": "@parameters('$connections')['sql-2']['connectionId']"
                        }
                      },
                      "method": "post",
                      "body": {
                        "LoadLogKey": "@body('LogEachNewHire')?['outputparameters']?['LoadLogKey']"
                      },
                      "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent(parameters('LoggingServer')))},@{encodeURIComponent(encodeURIComponent(parameters('LoggingDB')))}/procedures/@{encodeURIComponent(encodeURIComponent('[stage].[IntegrationLogSuccess]'))}"
                    },
                    "runAfter": {
                      "EEScope": [
                        "Succeeded"
                      ]
                    }
                  },
                  "LogEachNewHire": {
                    "type": "ApiConnection",
                    "inputs": {
                      "host": {
                        "connection": {
                          "name": "@parameters('$connections')['sql-2']['connectionId']"
                        }
                      },
                      "method": "post",
                      "body": {
                        "ApplicationName": "UKG_NewHire",
                        "DataSetType": "Emp",
                        "DataSetValue": "@{items('ForEachRecord')?['employeeNumber']}",
                        "DestinationSystemName": "F&O",
                        "EnvironmentName": "Prod",
                        "ExecutionId": "@{workflow()['run']['name']}",
                        "RecordIdentifier": "@{items('ForEachRecord')?['employeeNumber']}",
                        "SourceSystemName": "UKGPro",
                        "StellarIntegrationId": 40
                      },
                      "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent(parameters('LoggingServer')))},@{encodeURIComponent(encodeURIComponent(parameters('LoggingDB')))}/procedures/@{encodeURIComponent(encodeURIComponent('[stage].[IntegrationLogStart]'))}"
                    }
                  }
                },
                "else": {
                  "actions": {}
                }
              }
            },
            "runtimeConfiguration": {
              "concurrency": {
                "repetitions": 1
              }
            }
          }
        },
        "else": {
          "actions": {
            "Update_ErrorLog": {
              "type": "AppendToStringVariable",
              "inputs": {
                "name": "ErrorLog",
                "value": "No New Hires found.\n\n"
              }
            }
          }
        },
        "runAfter": {
          "GetEmpRecords": [
            "Succeeded"
          ]
        }
      },
      "Date": {
        "type": "InitializeVariable",
        "description": "getPastTime(1,'Day','yyyy-MM-dd')",
        "inputs": {
          "variables": [
            {
              "name": "Date",
              "type": "string",
              "value": "@{getPastTime(1,'Day','yyyy-MM-dd')}"
            }
          ]
        },
        "runAfter": {
          "varTable": [
            "Succeeded"
          ]
        }
      },
      "Error_Log": {
        "type": "InitializeVariable",
        "inputs": {
          "variables": [
            {
              "name": "ErrorLog",
              "type": "string"
            }
          ]
        },
        "runAfter": {
          "LogStart": [
            "Succeeded"
          ]
        }
      },
      "GetEmpRecords": {
        "type": "Http",
        "inputs": {
          "uri": "@{parameters('UKGURL')}/personnel/v1/employment-details",
          "method": "GET",
          "headers": {
            "Authorization": "@parameters('UKGPProCreds')",
            "Content-Type": "application/json",
            "US-Customer-Api-Key": "@parameters('UKGProAppKey')"
          },
          "queries": {
            "dateTimeCreated": "@variables('Date')"
          }
        },
        "runAfter": {
          "NumberSeq": [
            "Succeeded"
          ]
        }
      },
      "LogFail": {
        "type": "ApiConnection",
        "inputs": {
          "host": {
            "connection": {
              "name": "@parameters('$connections')['sql-2']['connectionId']"
            }
          },
          "method": "post",
          "body": {
            "LoadLogKey": "@body('LogStart')?['outputparameters']?['LoadLogKey']"
          },
          "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent(parameters('LoggingServer')))},@{encodeURIComponent(encodeURIComponent(parameters('LoggingDB')))}/procedures/@{encodeURIComponent(encodeURIComponent('[stage].[IntegrationLogFailure]'))}"
        },
        "runAfter": {
          "SendFailEmail": [
            "Succeeded"
          ]
        }
      },
      "LogStart": {
        "type": "ApiConnection",
        "inputs": {
          "host": {
            "connection": {
              "name": "@parameters('$connections')['sql-2']['connectionId']"
            }
          },
          "method": "post",
          "body": {
            "ApplicationName": "UKG_NewHire",
            "DataSetType": "Emp",
            "DataSetValue": "None",
            "DestinationSystemName": "F&O",
            "EnvironmentName": "Prod",
            "ExecutionId": "@{workflow()['run']['name']}",
            "RecordIdentifier": "Main",
            "SourceSystemName": "UKGPro",
            "StellarIntegrationId": 40
          },
          "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent(parameters('LoggingServer')))},@{encodeURIComponent(encodeURIComponent(parameters('LoggingDB')))}/procedures/@{encodeURIComponent(encodeURIComponent('[stage].[IntegrationLogStart]'))}"
        },
        "runAfter": {}
      },
      "LogSuccess": {
        "type": "ApiConnection",
        "inputs": {
          "host": {
            "connection": {
              "name": "@parameters('$connections')['sql-2']['connectionId']"
            }
          },
          "method": "post",
          "body": {
            "LoadLogKey": "@body('LogStart')?['outputparameters']?['LoadLogKey']"
          },
          "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent(parameters('LoggingServer')))},@{encodeURIComponent(encodeURIComponent(parameters('LoggingDB')))}/procedures/@{encodeURIComponent(encodeURIComponent('[stage].[IntegrationLogSuccess]'))}"
        },
        "runAfter": {
          "NotificationCheck": [
            "Succeeded"
          ]
        }
      },
      "NewHireFound": {
        "type": "InitializeVariable",
        "inputs": {
          "variables": [
            {
              "name": "NewHireFound",
              "type": "boolean",
              "value": "@false"
            }
          ]
        },
        "runAfter": {
          "Date": [
            "Succeeded"
          ]
        }
      },
      "NotificationCheck": {
        "type": "If",
        "expression": {
          "and": [
            {
              "equals": [
                "@variables('NewHireFound')",
                "@true"
              ]
            }
          ]
        },
        "actions": {
          "Append_to_string_build_table": {
            "type": "AppendToStringVariable",
            "inputs": {
              "name": "varTable",
              "value": "</table>\n    </div>\n</body>\n</html>"
            }
          },
          "Send_an_email_(V2)_to_NewHire_at_TSGJAX_dot_COM": {
            "type": "ApiConnection",
            "description": "need to change back to ",
            "inputs": {
              "host": {
                "connection": {
                  "name": "@parameters('$connections')['office365']['connectionId']"
                }
              },
              "method": "post",
              "body": {
                "To": "@parameters('EmailNotification')",
                "Subject": "New Hire Notification",
                "Body": "<p>@{variables('varTable')}</p>",
                "Bcc": "",
                "Importance": "Normal"
              },
              "path": "/v2/Mail"
            },
            "runAfter": {
              "Append_to_string_build_table": [
                "Succeeded"
              ]
            }
          }
        },
        "else": {
          "actions": {}
        },
        "runAfter": {
          "CheckForRecords": [
            "Succeeded",
            "Failed",
            "Skipped",
            "TimedOut"
          ]
        }
      },
      "NumberSeq": {
        "type": "InitializeVariable",
        "inputs": {
          "variables": [
            {
              "name": "NumberSeq",
              "type": "string"
            }
          ]
        },
        "runAfter": {
          "NewHireFound": [
            "Succeeded"
          ]
        }
      },
      "SendFailEmail": {
        "type": "ApiConnection",
        "inputs": {
          "host": {
            "connection": {
              "name": "@parameters('$connections')['office365']['connectionId']"
            }
          },
          "method": "post",
          "body": {
            "To": "jthorn@stellar.net; integration@stellar.net",
            "Subject": "UKG_NewHire failed",
            "Body": "<p>@{workflow()}</p>",
            "Importance": "Normal"
          },
          "path": "/v2/Mail"
        },
        "runAfter": {
          "CheckForRecords": [
            "Failed"
          ],
          "LogSuccess": [
            "Failed"
          ]
        }
      },
      "varTable": {
        "type": "InitializeVariable",
        "inputs": {
          "variables": [
            {
              "name": "varTable",
              "type": "string",
              "value": "<!DOCTYPE html>\n\n<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n    <meta charset=\"utf-8\" />\n    <title></title>\n</head>\n<style>\nbody {font-family:verdana;}\ntable, th, td {text-align:center;padding: 30px;border: 1px solid black;border-collapse: collapse;}\n</style>\n<body>\n<p>In the Stellar Group Incorporated Environment:<br>\n<br>\nThe following employee(s) have recently been hired.<br>\n<br>\n    <div>\n      <table>\n         <tr>\n          <th>Name</th>\n<th>Title</th>\n<th>Department</th>\n<th>Supervisor</th>\n<th>Start Date</th>\n<th>Employee Id</th>\n</tr>"
            }
          ]
        },
        "runAfter": {
          "Error_Log": [
            "Succeeded"
          ]
        }
      }
    },
    "outputs": {},
    "parameters": {
      "D365": {
        "defaultValue": "stellar-fo.operations.dynamics.com",
        "type": "String"
      },
      "EmailNotification": {
        "defaultValue": "",
        "type": "String"
      },
      "LoggingDB": {
        "defaultValue": "",
        "type": "String"
      },
      "LoggingServer": {
        "defaultValue": "",
        "type": "String"
      },
      "UKGPProCreds": {
        "defaultValue": " ",
        "type": "String"
      },
      "UKGProAppKey": {
        "defaultValue": "",
        "type": "String"
      },
      "UKGURL": {
        "defaultValue": " https://service4.ultipro.com",
        "type": "String"
      },
      "$connections": {
        "type": "Object",
        "defaultValue": {}
      }
    }
  },
  "parameters": {
    "$connections": {
      "value": {
        "dynamicsax-1": {
          "id": "/subscriptions/e14857b9-313c-44cf-b59d-094dabd82a55/providers/Microsoft.Web/locations/eastus/managedApis/dynamicsax",
          "connectionId": "/subscriptions/e14857b9-313c-44cf-b59d-094dabd82a55/resourceGroups/IntegrationLogicApps/providers/Microsoft.Web/connections/dynamicsax-7",
          "connectionName": "dynamicsax-7"
        },
        "sql-2": {
          "id": "/subscriptions/e14857b9-313c-44cf-b59d-094dabd82a55/providers/Microsoft.Web/locations/eastus/managedApis/sql",
          "connectionId": "/subscriptions/e14857b9-313c-44cf-b59d-094dabd82a55/resourceGroups/IntegrationLogicApps/providers/Microsoft.Web/connections/sql-7",
          "connectionName": "sql-7"
        },
        "office365": {
          "id": "/subscriptions/e14857b9-313c-44cf-b59d-094dabd82a55/providers/Microsoft.Web/locations/eastus/managedApis/office365",
          "connectionId": "/subscriptions/e14857b9-313c-44cf-b59d-094dabd82a55/resourceGroups/IntegrationLogicApps/providers/Microsoft.Web/connections/office365-5",
          "connectionName": "office365-5"
        }
      }
    }
  }
}

Screenshots or Videos

No response

Browser

Edge Version 124.0.2478.51 (Official build) stable app, beta channel (64-bit)

Additional context

No response

Eric-B-Wu commented 6 months ago

Would you be able to see if the issue is fixed in: http://portal.azure.com/?feature.canmodifystamps=true&Microsoft_Azure_EMA=hotfix#home We're currently hotfixing a different issue, but it may be linked with this one

hardEight commented 6 months ago

@Eric-B-Wu I did check it, and that appears to have solved it! Any idea when the hotfix will be released?

Thanks!

Eric-B-Wu commented 6 months ago

We'll be running a hotfix today, there was a delay due to one of our dependent partner services being down; however, I tried a deployment today and it seemed to work. So will update once all stations are deployed

hartra344 commented 6 months ago

@hardEight closing this issue for now, the hotfix will be rolling out to production today, in the meantime feel free to use the link above.

Eric-B-Wu commented 6 months ago

deployment has now finished in all regions