Hi All,
I think i have a very simple requirement but i cant seem to get it to work. I just want the API to make use of the entity which the user is currently using in the workflow. The code i now have is as following
Dim sURL As String = "xxx"
Dim pkWFunitPk As WorkflowUnitPk = BRApi.Workflow.General.GetWorkflowUnitPk(si)
Dim sYear As String = TimeDimHelper.GetYearFromId(pkWFunitPk.TimeKey).ToString
Dim sPeriod As String = TimeDimHelper.GetSubComponentsFromId(pkWFunitPk.TimeKey).Month.ToString
Dim sAPIKey As String = "xxx"
Dim sYearPeriodParam As String = String.Format("?yearPeriod={0}{1}", sYear, sPeriod)
Dim sEntities As String = "&company=244"
'Dim sEntityParam As String = String.Format("&company=[{0}]", sEntities)
Dim sJson As String = String.Empty
'----------------------------------------------------------------------------------------------------
'Execute HTTP Request
Using client As New HttpClient
client.DefaultRequestHeaders.Add("Client_Secret", sAPIKey)
'Send the GET request
Dim response As HttpResponseMessage = client.GetAsync(String.Format("{0}{1}{2}", sURL, sYearPeriodParam, sEntities)).Result
response.EnsureSuccessStatusCode()