Delen via


msdyn_ForecastApi actie

Lees als ontwikkelaar deze referentiedocumentatie om de msdyn_ForecastApi aangepaste actie te gebruiken om prognosegegevens op te halen en bij te werken. U kunt deze actie ook gebruiken om prognosegegevens van tijd tot tijd op te slaan als een momentopname. U kunt de momentopname vervolgens gebruiken om de prognosegegevens in de loop van de tijd te vergelijken. Gebruik de voorbeeldcode van de prognose-API om aan de slag te gaan met de msdyn_ForecastApi aangepaste actie.

Parameterwaarden

Parameternaam Verplicht Description
WebApiName Yes Bevat de naam van de API die moet worden uitgevoerd.
RequestJson Yes Bevat de parameters en de argumenten voor de API-aanroep.

Lijst met API's

Hieronder vindt u de set API's die u kunt aanroepen met behulp van de msdyn_ForecastApi aangepaste actie.

GET_ForecastConfigurations

Geeft de lijst met alle geconfigureerde prognoseconfiguraties terug.

Example

POST [Organization URI]/api/data/v9.1/msdyn_ForecastApi/ HTTP/1.1
Content-Type: application/json

{
    "WebApiName": "GET_ForecastConfigurations",
    "RequestJson": "{}"
}
Kenmerk Typologie Description
WebApiName String Naam van de API
RequestJson String JSON-object met serienummer

Reactie

{
   "@odata.context": "[Organization URI]/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.msdyn_ForecastApiResponse",
   "response": [
      {
         "Columns": [
             {
                        "ForecastConfigurationColumnId": "0ad51075-912b-4e00-a7a1-91170e437d27",
                        ...
                        "ForecastConfigurationId": "27bd2c40-f868-ea11-a811-000d3a37bb2c",
                        ...
             },
             {
                        "ForecastConfigurationColumnId": "c3ef8024-6517-4168-adc7-bb5b520554a0",
                        ...
                        "ForecastConfigurationId": "27bd2c40-f868-ea11-a812-125d3a37bb2d",
                        ...
               
             }],
         "PermissionRoles": null,
         "AdditionalFilters": "<fetch version=\"1.0\" mapping=\"logical\"><entity name=\"opportunity\"><\/entity><\/fetch>",
         "IsSnapshotScheduled": false,
         "SnapshotSchedule": null,
         "SnapshotTimeZone": null,
         "PublishedDateTime": "0001-01-01T00:00:00",
         "DefaultViewIdForUnderlyingRecords": "bf649add-6c30-ea11-a813-000d3a5475f7"
      }
   ]
}

Retourwaarde

Lijst met voorspellingsconfiguraties.

GET_ForecastConfigurationsByName

Retourneert alle prognoseconfiguraties met de naam die is opgegeven als onderdeel van de payload van de aanvraag.

Example

POST [Organization URI]/api/data/v9.1/msdyn_ForecastApi HTTP/1.1
Content-Type: application/json

{
    "WebApiName": "GET_ForecastConfigurationsByName",
    "RequestJson": "{\"Name\":\"api_test1\"}"
}
Kenmerk Typologie Description
WebApiName String Naam van de API
RequestJson JSON-object Bestaat uit Name: naam van de prognoseconfiguratie

Reactie

{
   "@odata.context": "[Organization URI]/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.msdyn_ForecastApiResponse",
   "response": [
      {
         "Columns": [
             {
                 "Name": "api_test1",
                 ...
                 "ForecastConfigurationId": "bcf37937-487e-ea11-a811-000d3a37bb2c",
                 ...
             }
         ],
         "PermissionRoles": null,
         "AdditionalFilters": "<fetch version=\"1.0\" mapping=\"logical\"><entity name=\"opportunity\"><\/entity><\/fetch>",
         "IsSnapshotScheduled": false,
         "SnapshotSchedule": null,
         "SnapshotTimeZone": null,
         "PublishedDateTime": "0001-01-01T00:00:00",
         "DefaultViewIdForUnderlyingRecords": "bf649add-6c30-ea11-a813-000d3a5475f7"
      }
   ]
}

Retourwaarde

Lijst met voorspellingsconfiguraties.

GET_ForecastPeriodsByForecastConfigurationId

Retourneert alle prognoseperioden voor de actieve prognoseconfiguratie-id, die wordt opgegeven als onderdeel van de nettolading van de aanvraag.

Example

POST [Organization URI]/api/data/v9.1/msdyn_ForecastApi HTTP/1.1
Content-Type: application/json

{
  "WebApiName": "GET_ForecastPeriodsByForecastConfigurationId",
  "RequestJson": "{
      \"ForecastConfigurationId\":\"04323a04-da7f-ea11-a811-000d3a37bb2c\"
      }"
}
Kenmerk Typologie Description
WebApiName String Naam van de API
RequestJson JSON-object Bevat ForecastConfigurationId: Configuratie-id voor prognose

Reactie

{
   "@odata.context": "[Organization URI]/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.msdyn_ForecastApiResponse",
   "response": [
      {
         "Id": "8b8cadd8-ede3-4b21-97cf-93efc0337089",
         "ForecastConfigurationId": "04323a04-da7f-ea11-a811-000d3a37bb2c",
         "RecurrenceIndex": 0,
         "ValidFrom": "2020-04-01T00:00:00Z",
         "ValidTo": "2020-06-30T23:59:59Z",
         "Name": "FY2020 Q2",
         "RecomputeStatus": 10,
         "LastRecomputedOn": "2020-05-25T08:04:24.817Z",
         "RecomputationStartTime": "2020-06-05T05:04:30.904Z",
         "RecomputeStatusChangedOn": "2020-06-05T06:04:00.363Z",
         "FailureInfo": "Microsoft.Azure.WebJobs.FunctionFailedException: The activity function 'CreateUpdateForecastHierarchy' failed: \"An item with the same key has already been added. Key: aaaaaaaa-0b0b-1c1c-2d2d-333333333333\". See the function execution logs for additional details. ---> System.ArgumentException: An item with the same key has already been added. Key: aaaaaaaa-0b0b-1c1c-2d2d-333333333333\r\n   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)\r\n   at Microsoft.Dynamics.Forecasting.RecomputeEngine.HierarchyManager.<>c__DisplayClass23_0.<GetForecastInstancesByHierarchyEntityId>b__0(ForecastInstance forecastInstance) in C:\\src\\cloud_IDEs\\ide5\\Azure\\RecomputeEngine\\HierarchyManager\\HierarchyManager.cs:line 727\r\n   at System.Collections.Generic.List`1.ForEach(Action`1 action)\r\n   at Microsoft.Dynamics.Forecasting.RecomputeEngine.HierarchyManager.GetForecastInstancesByHierarchyEntityId(ForecastConfiguration forecastConfiguration, Guid forecastRecurrenceId) in C:\\src\\cloud_IDEs\\ide5\\Azure\\RecomputeEngine\\HierarchyManager\\HierarchyManager.cs:line 727\r\n   at Microsoft.Dynamics.Forecasting.RecomputeEngine.HierarchyManager.CreateOrUpdateForecastDataWithLatestHierarchy(ForecastConfiguration forecastConfiguration, Guid forecastRecurrenceId, Dictionary`2 latestHierarchyEntityList) in C:\\src\\cloud_IDEs\\ide5\\Azure\\RecomputeEngine\\HierarchyManager\\HierarchyManager.cs:line 602\r\n   at Microsoft.Dynamics.Forecasting.RecomputeEngine.HierarchyManager.<>c__DisplayClass16_0.<CreateOrUpdateForecastHierarchy>b__0() in C:\\src\\cloud_IDEs\\ide5\\Azure\\RecomputeEngine\\HierarchyManager\\HierarchyManager.cs:line 283\r\n   at System.Threading.Tasks.Task.InnerInvoke()\r\n   at System.Threading.Tasks.Task.<>c.<.cctor>b__275_1(Object obj)\r\n   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at Microsoft.Dynamics.Forecasting.RecomputeEngine.HierarchyManager.CreateOrUpdateForecastHierarchy(ForecastConfiguration forecastConfiguration, Guid forecastRecurrenceId, Dictionary`2 latestHierarchyEntityList) in C:\\src\\cloud_IDEs\\ide5\\Azure\\RecomputeEngine\\HierarchyManager\\HierarchyManager.cs:line 255\r\n   at Microsoft.Dynamics.Forecasting.RecomputeEngine.HierarchyManager.CreateOrUpdateForecastHierarchy(Guid orgId, Guid forecastConfigurationId, Guid forecastRecurrenceId, Dictionary`2 latestHierarchyEntityList) in C:\\src\\cloud_IDEs\\ide5\\Azure\\RecomputeEngine\\HierarchyManager\\HierarchyManager.cs:line 167\r\n   at Microsoft.Dynamics.Forecasting.AzureFunctions.CreateUpdateForecastHierarchy.Run(CreateUpdateForecastHierarchyInput input) in C:\\src\\cloud_IDEs\\ide5\\Azure\\AzureFunctions\\Recompute\\ActivityFunctions\\CreateUpdateForecastHierarchy.cs:line 43\r\n   at Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker`2.InvokeAsync(TReflected instance, Object[] arguments) in C:\\projects\\azure-webjobs-sdk-rqm4t\\src\\Microsoft.Azure.WebJobs.Host\\Executors\\VoidTaskMethodInvoker.cs:line 20\r\n   at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`2.InvokeAsync(Object instance, Object[] arguments) in C:\\projects\\azure-webjobs-sdk-rqm4t\\src\\Microsoft.Azure.WebJobs.Host\\Executors\\FunctionInvoker.cs:line 52\r\n   at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in C:\\projects\\azure-webjobs-sdk-rqm4t\\src\\Microsoft.Azure.WebJobs.Host\\Executors\\FunctionExecutor.cs:line 585\r\n   at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in C:\\projects\\azure-webjobs-sdk-rqm4t\\src\\Microsoft.Azure.WebJobs.Host\\Executors\\FunctionExecutor.cs:line 532\r\n   at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, IFunctionOutputDefinition outputDefinition, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in C:\\projects\\azure-webjobs-sdk-rqm4t\\src\\Microsoft.Azure.WebJobs.Host\\Executors\\FunctionExecutor.cs:line 468\r\n   at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in C:\\projects\\azure-webjobs-sdk-rqm4t\\src\\Microsoft.Azure.WebJobs.Host\\Executors\\FunctionExecutor.cs:line 278\r\n   --- End of inner exception stack trace ---\r\n   at Microsoft.Azure.WebJobs.DurableOrchestrationContext.CallDurableTaskFunctionAsync[TResult](String functionName, FunctionType functionType, String instanceId, RetryOptions retryOptions, Object input) in E:\\functions\\azure-functions-durable-extension\\src\\WebJobs.Extensions.DurableTask\\DurableOrchestrationContext.cs:line 498\r\n   at Microsoft.Dynamics.Forecasting.AzureFunctions.OrchestratorFunctionBase.ExecuteActivityAsync(DurableOrchestrationContext context, String functionName, Object input, Dictionary`2 telemetryProps) in C:\\src\\cloud_IDEs\\ide5\\Azure\\AzureFunctions\\OrchestratorFunctionBase.cs:line 252\r\n   at Microsoft.Dynamics.Forecasting.AzureFunctions.RecomputeOrchestrator.ExecuteRecomputeOrchestration(DurableOrchestrationContext context, RecomputeOrchestratorInput recomputeInput, String correlationId, Dictionary`2 telemetryProps) in C:\\src\\cloud_IDEs\\ide5\\Azure\\AzureFunctions\\Recompute\\RecomputeOrchestrator.cs:line 169",
         "RecurrenceState": 0,
         "UpdatedAttribteList": null
      }
    ]
}

Retourwaarde

Lijst met prognoseperiodes.

GET_ForecastInstances

Retourneert de lijst met prognose-exemplaren die een entiteitsrecord met één rij vormen.

Opmerking

Prognoseperioden kunnen veel voorspellingsvoorbeelden hebben. Veel meer dan je in één verzoek zou willen ophalen. De API-eindpunten bieden standaard een beperkt aantal items per aanvraag.
Opmerking: Grote query's kunnen de prestaties schaden, dus het aantal resultaten per pagina is beperkt tot 4000 records. Als u meer dan 4000 records wilt ophalen, bijvoorbeeld om een lijst aan de clientzijde op te stellen van alle beschikbare prognose-exemplaren, kunt u meerdere API-verzoeken indienen en de resultaten binnen uw toepassing combineren.

Example

POST [Organization URI]/api/data/v9.1/msdyn_ForecastApi HTTP/1.1
Content-Type: application/json

{
    "WebApiName": "GET_ForecastInstances",
    "RequestJson": "{\"ForecastPeriodId\":\"a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1\",\"ForecastConfigurationId\":\"b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2\",\"PageInfo\":{\"SortingAttribute\":\"HierarchyEntityRecord.RecordId\",\"SortingOrder\":\"DESC\",\"PageSize\":1,\"PageNo\":5},\"GetParticipatingRecordsFetchXml\":false,\"ParticipatingRecordsViewId\":\"c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3"}"
}
Kenmerk Typologie Description
WebApiName String Naam van de API
RequestJson JSON-object Bestaat uit
ForecastPeriodId: Unieke identificatiecode van de prognoseperiode
ForecastConfigurationId: Unieke identificatie van de prognoseconfiguratie
SortingAttribute: Het kenmerk op basis waarvan u wilt sorteren in de paging
SortingOrder: ASC voor oplopende orde DSC voor aflopende orde
PageSize: Aantal records dat u op één pagina wilt ophalen
PageNo: Voor welke paginarecords u wilt ophalen.
GetParticipatingRecordsFetchXml: Vlag die aangeeft of deelnemende records XML ophalen nodig is in het antwoord.
ParticipatingRecordsViewId: Dit is nodig als GetParticipatingRecordsFetchXml het waar is. Dit is een opgeslagen query-ID (weergave) waarmee de deelnemende records XML ophalen.

Hieronder ziet u het voorbeeld JSON voor RequestJson object.

{
    "WebApiName": "GET_ForecastInstances",
    "RequestJson": "{\"ForecastPeriodId\":\"{{frid}}\",\"ForecastConfigurationId\":\"{{fcid}}\",\"PageInfo\":{\"SortingAttribute\":\"HierarchyEntityRecord.RecordId\",\"SortingOrder\":\"ASC\",\"PageSize\":1,\"PageNo\":5},\"GetParticipatingRecordsFetchXml\":false,\"ParticipatingRecordsViewId\":\"bf649add-6c30-ea11-a813-000d3a5475f7\"}"
}

Reactie

{
   "@odata.context": "[Organization URI]/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.msdyn_ForecastApiResponse",
   "response": {
      "ForecastInstances": [
          "ForecastInstanceId": "95d2305a-a0be-4b34-84ac-b10e67b0771a",
          "ForecastConfigurationId": "04323a04-da7f-ea11-a811-000d3a37bb2c",
            ...],
      "HasMorePages": false,
      "ParticipatingRecordsFetchXml": "",
      "Code": 200,
      "Message": "OK"
   }
}

Retourwaarde

Lijst met prognose-instanties.

Update_SimpleColumnByEntityId

Werkt de specifieke kolomwaarden bij met behulp van de waarden van de doorgegeven parameters.

Opmerking

Een groot aantal updateverzoeken in één API-aanroep kan de prestaties schaden, dus de updates per aanvraag zijn beperkt tot 50.

Example

POST [Organization URI]/api/data/v9.1/msdyn_ForecastApi HTTP/1.1
content-type: application/json

{
    "WebApiName": "Update_ SimpleColumnByEntityId",
    "RequestJson": "
    {
      \"ForecastConfigurationId\":\"0461fb6b-8d85-ea11-a811-000d3a37bb2c\",
      \"ForecastRecurranceId\":\"f8b1122c-b913-4e88-9727-368b6134be3e\",
      \"SimpleColumnUpdateRequests\":[{
        \" HierarchyEntityRecordId\":\"d8680b00-fd31-46c2-8136-7c4df19cf2a8\",
        \"ForecastConfigurationColumnId\":\"65ec7bd1-2de6-49fa-b259-ba74bc721c78\",
        \"ForecastConfigurationColumnValue\":0.0,
        \"IsRolledUpColumnUpdate\":false},{
        \" HierarchyEntityRecordId\":\"11141300-131b-493a-9857-22bd8689b775\",
        \"ForecastConfigurationColumnId\":\"65ec7bd1-2de6-49fa-b259-ba74bc721c78\",
        \"ForecastConfigurationColumnValue\":0.0,
        \"IsRolledUpColumnUpdate\":false}]}"
}
Kenmerk Naam Description
WebApiNaam String Naam van de API
ForecastConfigurationId GUID (Globaal Unieke Identificatiecode) Configuratie-id prognose
ForecastRecurranceId GUID (Globaal Unieke Identificatiecode) Prognose-herhalings-id of prognoseperiode-id Een lijst van SimpleColumnUpdateRequests is een array
HierarchyEntityRecordId GUID (Globaal Unieke Identificatiecode) EntityRecordId
ForecastConfigurationColumnId GUID (Globaal Unieke Identificatiecode) Prognose configuratie Kolom-ID
ForecastConfigurationColumnValue Gegevenstype van ForecastConfigurationColumn Waarde die moet worden bijgewerkt naar
IsRolledUpColumnUpdate(optioneel) Booleaan True Als de waarde wordt bijgewerkt voor de opgerolde kolom, False als de waarde wordt bijgewerkt voor de kolom Aggregatie

Reactie

{
   "@odata.context": "[Organization URI]/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.msdyn_ForecastApiResponse",
   "response": [
      {
         "Message": "Update Successful",
         "StatusCode": 0,
         "HierarchyEntityRecordId": "d8680b00-fd31-46c2-8136-7c4df19cf2a8",
         "ForecastConfigurationColumnId": "65ec7bd1-2de6-49fa-b259-ba74bc721c78"
      },
      {
         "Message": "Update Successful",
         "StatusCode": 0,
         "HierarchyEntityRecordId": "11141300-131b-493a-9857-22bd8689b775",
         "ForecastConfigurationColumnId": "65ec7bd1-2de6-49fa-b259-ba74bc721c78"
      }
   ]
}

Retourwaarde

Een lijst van UpdateSimpleColumnByEntityResponse records bestaande uit HierarchyEntityRecordId, ForecastConfigurationColumnId, Message, StatusCode.

Update_SimpleColumnByFIId

Werkt de specifieke kolomwaarde bij door de waarden van de doorgegeven parameters in te stellen.

Opmerking

Een groot aantal updateverzoeken in één API-aanroep kan de prestaties schaden, dus de updates per aanvraag zijn beperkt tot 50.

Example

POST [Organization URI]/api/data/v9.1/msdyn_ForecastApi HTTP/1.1
content-type: application/json

{
    "WebApiName": "Update_SimpleColumnByFIId",
    "RequestJson": "
    {
      \"ForecastConfigurationId\":\"0461fb6b-8d85-ea11-a811-000d3a37bb2c\",
      \"ForecastRecurranceId\":\"f8b1122c-b913-4e88-9727-368b6134be3e\",
      \"SimpleColumnUpdateRequests\":[
      {
        \"ForecastInstanceId\":\"d8680b00-fd31-46c2-8136-7c4df19cf2a8\",
        \"ForecastConfigurationColumnId\":\"65ec7bd1-2de6-49fa-b259-ba74bc721c78\",
        \"ForecastConfigurationColumnValue\":0.0,
        \"IsRolledUpColumnUpdate\":false},
        {
          \"ForecastInstanceId\":\"11141300-131b-493a-9857-22bd8689b775\",
          \"ForecastConfigurationColumnId\":\"65ec7bd1-2de6-49fa-b259-ba74bc721c78\",
          \"ForecastConfigurationColumnValue\":0.0,
          \"IsRolledUpColumnUpdate\":false}]}"
}
Kenmerk Typologie Description
WebApiNaam String Naam van de API
ForecastConfigurationId GUID (Globaal Unieke Identificatiecode) Configuratie-id prognose
ForecastRecurranceId Guid Prognose-herhalings-ID of Prognoseperiode-ID
SimpleColumnUpdateRequests Array Bevat het volgende
ForecastInstanceId GUID (Globaal Unieke Identificatiecode) Id van voorspellingsinstantie
ForecastConfigurationColumnId GUID (Globaal Unieke Identificatiecode) Prognose configuratie Kolom-ID
ForecastConfigurationColumnValue Gegevenstype van ForecastConfigurationColumn Waarde die moet worden bijgewerkt naar
IsRolledUpColumnUpdate(optioneel) Booleaan True Als de waarde wordt bijgewerkt voor de opgerolde kolom, false als de waarde wordt bijgewerkt voor de kolom Aggregatie

Reactie

{
   "@odata.context": "[Organization URI]/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.msdyn_ForecastApiResponse",
   "response": [
      {
         "Message": "Update Successful",
         "StatusCode": 0,
         "ForecastInstanceId": "d8680b00-fd31-46c2-8136-7c4df19cf2a8",
         "ForecastConfigurationColumnId": "65ec7bd1-2de6-49fa-b259-ba74bc721c78"
      },
      {
         "Message": "Update Successful",
         "StatusCode": 0,
         "ForecastInstanceId": "11141300-131b-493a-9857-22bd8689b775",
         "ForecastConfigurationColumnId": "65ec7bd1-2de6-49fa-b259-ba74bc721c78"
      }
   ]
}

Retourwaarde

Een lijst van UpdateSimpleColumnByEntityResponse records bestaande uit ForecastInstanceId, ForecastConfigurationColumnId, Message, StatusCode.

GET_ParticipatingRecordsFetchxml

Retourneert de fetch XML om de onderliggende records in een prognose op te halen.

Example


POST /api/GET_ParticipatingRecordsFetchxml HTTP/1.1
Host: your-api-endpoint.com
Content-Type: application/json

{
    "ForecastConfigurationId": "a01f86da-1b45-ef11-bfe2-6045bd066f80",
    "ForecastPeriodId": "a51f86da-1b45-ef11-bfe2-6045bd066f80",
    "HierarchyRecordId": "697adf08-df43-ef11-bfe2-6045bd07ea28",
    "ForecastInstanceId": "69169046-520b-4040-abfa-2981a2f0aee3",
    "ForecastConfigurationColumnId": "f06490f5-6c27-453c-b06c-0194819202a4",
    "RecordViewId": "bf649add-6c30-ea11-a813-000d3a5475f7",
    "IsRolledUpNodeRequested": "true"
}

Kenmerk Typologie Description
ForecastConfigurationId GUID (Globaal Unieke Identificatiecode) Configuratie-id van de prognose
VoorspellingPeriode-id GUID (Globaal Unieke Identificatiecode) ID van de prognoseperiode
HiërarchieRecordId GUID (Globaal Unieke Identificatiecode) De record-id in Dataverse waarvoor de onderliggende record moet worden opgehaald. Bijvoorbeeld de gebruikers-ID van het systeem in het geval van een organigramprognose of de regio-ID in het geval van een regioprognose.
ForecastInstanceId GUID (Globaal Unieke Identificatiecode) ID van prognose-instantie
ForecastConfigurationColumnId GUID (Globaal Unieke Identificatiecode) ID van de prognosekolom die moet worden opgehaald. Als u bijvoorbeeld alleen de deelnemende records wilt ophalen voor de kolom Best Case van uw prognose, voert u de kolom-ID van de kolom Best Case in. U kunt slechts één kolom-ID invoeren voor elke aanvraag. Als u meer kolommen wilt ophalen, moet u voor elke kolom een verzoek verzenden. Sla deze parameter over als u XML wilt ophalen voor alle kolommen van de prognose. U kunt de kolom-ID ophalen uit de definitie van de prognoseconfiguratie .
RecordViewId GUID (Globaal Unieke Identificatiecode) Recordweergave-ID van de onderliggende records. Meer informatie over het ophalen van de weergave-id in savedquery EntityType
IsRolledUpNodeRequested Booleaan Geeft aan of de waarden voor het opgerolde knooppunt (groep) of het afzonderlijke knooppunt moeten worden geretourneerd. Als deze optie is ingesteld op true, worden alle records onder het groepsknooppunt geretourneerd. Als deze optie is ingesteld op onwaar, wordt alleen de record van de persoon geretourneerd.

Reactie

{

    "@odata.context": "https://orgname.dynamics.com/api/data/v9.0/$metadata#Microsoft.Dynamics.CRM.msdyn_ForecastApiResponse",

    "response": "<fetch version=\"1.0\" mapping=\"logical\" distinct=\"true\"><entity name=\"opportunity\"><filter type=\"and\"><condition attribute=\"estimatedclosedate\" operator=\"between\"><value>2024-07-01T00:00:00.0000000Z</value><value>2024-09-30T23:59:59.0000000Z</value></condition><condition attribute=\"msdyn_forecastcategory\" operator=\"eq\" value=\"100000001\" /></filter><link-entity name=\"systemuser\" from=\"systemuserid\" to=\"ownerid\" link-type=\"inner\"><attribute name=\"systemuserid\" /><filter type=\"and\"><condition attribute=\"systemuserid\" operator=\"eq-or-under\" value=\"697adf08-df43-ef11-bfe2-6045bd07ea28\" /></filter></link-entity><attribute name=\"name\" /><attribute name=\"statuscode\" /><attribute name=\"statecode\" /><attribute name=\"customerid\" /><attribute name=\"ownerid\" /><attribute name=\"msdyn_forecastcategory\" /><attribute name=\"estimatedvalue\" /><attribute name=\"estimatedclosedate\" /><attribute name=\"actualvalue\" /><attribute name=\"actualclosedate\" /><attribute name=\"opportunityid\" /><order attribute=\"name\" descending=\"false\" /></entity></fetch>"

}

Retourwaarde

Een XML-query ophalen die de onderliggende records in een prognose retourneert.

Aangepaste acties voor prognoses