msdyn_ForecastApi tindakan

Sebagai pembangun, baca dokumentasi rujukan ini untuk menggunakan msdyn_ForecastApi tindakan tersuai untuk mendapatkan semula dan mengemas kini data ramalan. Anda juga boleh menggunakan tindakan ini untuk menyimpan data ramalan dari semasa ke semasa, sebagai syot kilat. Anda kemudian boleh menggunakan syot kilat untuk membandingkan data ramalan dari semasa ke semasa. Gunakan kod sampel API ramalan untuk bermula dengan msdyn_ForecastApi tindakan tersuai.

Parameter

Nama parameter Wajib Perihalan
WebApiName Ya Mengandungi nama API yang akan dilaksanakan.
RequestJson Ya Mengandungi parameter dan hujah untuk panggilan API.

Senarai API

Diberikan di bawah ialah set API yang boleh anda gunakan menggunakan msdyn_ForecastApi tindakan tersuai.

GET_ForecastConfigurations

Mengembalikan senarai semua konfigurasi ramalan yang dikonfigurasikan.

Contoh

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

{
    "WebApiName": "GET_ForecastConfigurations",
    "RequestJson": "{}"
}
Parameter_ Taip Perihalan
WebApiName Rentetan Nama API
RequestJson Rentetan Objek JSON bersiri

Respons

{
   "@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"
      }
   ]
}

Nilai pulangan

Senarai Konfigurasi Ramalan.

GET_ForecastConfigurationsByName

Mengembalikan semua konfigurasi ramalan yang mempunyai nama yang disediakan sebagai sebahagian daripada muatan permintaan.

Contoh

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

{
    "WebApiName": "GET_ForecastConfigurationsByName",
    "RequestJson": "{\"Name\":\"api_test1\"}"
}
Parameter_ Taip Perihalan
WebApiName Rentetan Nama API
RequestJson Objek JSON Terdiri daripada Name: nama konfigurasi ramalan

Respons

{
   "@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"
      }
   ]
}

Nilai pulangan

Senarai Konfigurasi Ramalan.

GET_ForecastPeriodsByForecastConfigurationId

Mengembalikan semua tempoh ramalan untuk Id konfigurasi ramalan aktif, yang disediakan sebagai sebahagian daripada muatan permintaan.

Contoh

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\"
      }"
}
Parameter_ Taip Perihalan
WebApiName Rentetan Nama API
RequestJson Objek JSON Mengandungi ForecastConfigurationId: Id Konfigurasi Ramalan

Respons

{
   "@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
      }
    ]
}

Nilai pulangan

Senarai Tempoh Ramalan.

GET_ForecastInstances

Mengembalikan senarai contoh ramalan yang merupakan rekod entiti baris tunggal.

Nota

Tempoh ramalan boleh mempunyai banyak contoh ramalan. Jauh lebih daripada yang anda mahu tarik ke bawah dalam satu permintaan. Titik akhir API lalai untuk menyediakan bilangan item yang terhad bagi setiap permintaan.
Nota: Pertanyaan besar boleh menjejaskan prestasi, jadi bilangan hasil setiap halaman dihadkan pada 4000 rekod. Jika anda ingin mendapatkan semula lebih daripada 4000 rekod, contohnya untuk membina senarai bahagian pelanggan bagi semua tika ramalan yang tersedia, anda boleh membuat berbilang permintaan API dan menggabungkan hasil dalam aplikasi anda.

Contoh

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"}"
}
Parameter_ Taip Perihalan
WebApiName Rentetan Nama API
RequestJson Objek JSON Terdiri daripada
ForecastPeriodId: Pengecam unik tempoh ramalan
ForecastConfigurationId: Pengecam unik konfigurasi ramalan
SortingAttribute: Atribut berdasarkan yang anda mahu lakukan Pengisihan dalam halaman
SortingOrder: ASC untuk tertib menaik DSC untuk tertib menurun
PageSize: Bilangan rekod yang anda mahu dapatkan semula dalam satu halaman
PageNo: Rekod halaman yang anda mahu ambil.
GetParticipatingRecordsFetchXml: Bendera yang menunjukkan sama ada pengambilan XML rekod yang mengambil bahagian diperlukan dalam respons.
ParticipatingRecordsViewId: Ini diperlukan apabila GetParticipatingRecordsFetchXml benar. Ini ialah ID pertanyaan (pandangan) yang disimpan yang digunakan oleh XML pengambilan rekod yang mengambil bahagian dijana.

Diberikan di bawah ialah contoh JSON untuk RequestJson objek.

{
    "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\"}"
}

Respons

{
   "@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"
   }
}

Nilai pulangan

Senarai Contoh Ramalan.

Update_SimpleColumnByEntityId

Mengemas kini nilai lajur tertentu menggunakan nilai parameter yang diluluskan.

Nota

Sebilangan besar permintaan kemas kini dalam satu panggilan API boleh menjejaskan prestasi, jadi kemas kini setiap permintaan dihadkan pada 50.

Contoh

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}]}"
}
Parameter_ Nama Perihalan
WebApiName Rentetan Nama API
ForecastConfigurationId GUID Id Konfigurasi Ramalan
ForecastRecurranceId GUID Id Pengulangan Ramalan atau Id Tempoh Ramalan Senarai SimpleColumnUpdateRequests ialah tatasusunan
HierarkiEntityRecordId GUID EntityRecordId
ForecastConfigurationColumnId GUID Id Lajur Konfigurasi Ramalan
ForecastConfigurationColumnValue Jenis Data ForecastConfigurationColumn Nilai yang perlu dikemas kini kepada
IsRolledUpColumnUpdate(pilihan) Boolean True Jika nilai dikemas kini untuk lajur digulung, False jika nilai ialah Kemas kini untuk lajur agregat

Respons

{
   "@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"
      }
   ]
}

Nilai pulangan

Senarai UpdateSimpleColumnByEntityResponse rekod yang terdiri daripada HierarchyEntityRecordId, ForecastConfigurationColumnId, , MessageStatusCode.

Update_SimpleColumnByFIId

Mengemas kini nilai lajur tertentu dengan menetapkan nilai parameter yang diluluskan.

Nota

Sebilangan besar permintaan kemas kini dalam satu panggilan API boleh menjejaskan prestasi, jadi kemas kini setiap permintaan dihadkan pada 50.

Contoh

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}]}"
}
Parameter_ Taip Perihalan
WebApiName Rentetan Nama API
ForecastConfigurationId GUID Id Konfigurasi Ramalan
ForecastRecurranceId GUID Id Pengulangan Ramalan atau Id Tempoh Ramalan
SimpleColumnUpdateRequests Pelbagai Termasuk yang berikut
ForecastInstanceId GUID ID Contoh Ramalan
ForecastConfigurationColumnId GUID Id Lajur Konfigurasi Ramalan
ForecastConfigurationColumnValue Jenis Data ForecastConfigurationColumn Nilai yang perlu dikemas kini kepada
IsRolledUpColumnUpdate(pilihan) Boolean True Jika nilai dikemas kini untuk lajur digulung, false jika nilai ialah Kemas kini untuk lajur agregat

Respons

{
   "@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"
      }
   ]
}

Nilai pulangan

Senarai UpdateSimpleColumnByEntityResponse rekod yang terdiri daripada ForecastInstanceId, ForecastConfigurationColumnId, , MessageStatusCode.

GET_ParticipatingRecordsFetchxml

Mengembalikan XML ambil untuk mendapatkan semula rekod asas dalam ramalan.

Contoh


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"
}

Parameter_ Taip Perihalan
ForecastConfigurationId GUID ID konfigurasi ramalan
ForecastPeriodId GUID ID Tempoh Ramalan
HierarkiRecordId GUID ID rekod dalam Dataverse yang mana rekod asas harus diambil semula. Contohnya, ID pengguna sistem dalam kes Ramalan Carta Organisasi atau ID wilayah dalam kes Ramalan Wilayah.
ForecastInstanceId GUID ID contoh ramalan
ForecastConfigurationColumnId GUID ID lajur ramalan yang perlu diambil semula. Contohnya, apabila anda mahu mengambil hanya rekod yang mengambil bahagian untuk lajur Kes Terbaik ramalan anda, masukkan ID lajur lajur Kes Terbaik . Anda hanya boleh memasukkan satu ID lajur untuk setiap permintaan. Untuk mendapatkan semula lebih banyak lajur, anda harus menghantar permintaan bagi setiap lajur. Langkau parameter ini jika anda mahu mengambil XML untuk semua lajur ramalan. Anda boleh mendapatkan ID lajur daripada definisi Konfigurasi Ramalan .
RekodViewId GUID ID pandangan rekod bagi rekod asas. Ketahui lebih lanjut tentang mendapatkan ID pandangan dalam savedquery EntityType
IsRolledUpNodeRequested Boolean Menentukan sama ada untuk mengembalikan nilai untuk nod yang digulung (kumpulan) atau nod individu. Jika ditetapkan kepada benar, semua rekod di bawah nod kumpulan dikembalikan. Jika ditetapkan kepada palsu, hanya rekod individu itu dikembalikan.

Respons

{

    "@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>"

}

Nilai pulangan

Pertanyaan XML ambil yang mengembalikan rekod asas dalam ramalan.

Tindakan tersuai untuk ramalan