הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
כמפתח, קרא תיעוד עזר זה כדי להשתמש בפעולה המותאמת msdyn_ForecastApi אישית כדי לאחזר ולעדכן נתוני חיזוי. באפשרותך גם להשתמש בפעולה זו כדי לאחסן נתוני תחזית מעת לעת, כתמונה. לאחר מכן תוכל להשתמש בתמונה כדי להשוות את נתוני התחזית לאורך זמן. השתמש בקוד לדוגמה של API לחיזוי כדי להתחיל בפעולה המותאמת msdyn_ForecastApi אישית.
פרמטרים
| שם פרמטר | נדרש | Description |
|---|---|---|
WebApiName |
כן | מכיל את שם ה- API לביצוע. |
RequestJson |
כן | מכיל את הפרמטרים ואת הארגומנטים עבור קריאת ה-API. |
רשימת ממשקי API
להלן קבוצת ממשקי ה-API שתוכל להפעיל באמצעות הפעולה המותאמת msdyn_ForecastApi אישית.
GET_ForecastConfigurations
הפונקציה מחזירה את רשימת כל תצורות התחזית שהוגדרו.
דוגמה
POST [Organization URI]/api/data/v9.1/msdyn_ForecastApi/ HTTP/1.1
Content-Type: application/json
{
"WebApiName": "GET_ForecastConfigurations",
"RequestJson": "{}"
}
| פרמטר | סוג | Description |
|---|---|---|
WebApiName |
מחרוזת | שם ה-API |
RequestJson |
מחרוזת | אובייקט JSON טורי |
השב
{
"@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"
}
]
}
ערך החזרה
רשימת תצורות תחזית.
GET_ForecastConfigurationsByName
החזרת כל תצורות התחזית עם השם שסופק כחלק מתוכן מנה של בקשה.
דוגמה
POST [Organization URI]/api/data/v9.1/msdyn_ForecastApi HTTP/1.1
Content-Type: application/json
{
"WebApiName": "GET_ForecastConfigurationsByName",
"RequestJson": "{\"Name\":\"api_test1\"}"
}
| פרמטר | סוג | Description |
|---|---|---|
WebApiName |
מחרוזת | שם ה-API |
RequestJson |
אובייקט JSON | מורכב מ Name: שם תצורת התחזית |
השב
{
"@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"
}
]
}
ערך החזרה
רשימת תצורות תחזית.
GET_ForecastPeriodsByForecastConfigurationId
החזרת כל תקופות התחזית עבור מזהה תצורת התחזית הפעילה, המסופק כחלק מתוכן המנה של הבקשה.
דוגמה
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\"
}"
}
| פרמטר | סוג | Description |
|---|---|---|
WebApiName |
מחרוזת | שם ה-API |
RequestJson |
אובייקט JSON | מכיל ForecastConfigurationId: מזהה תצורת תחזית |
השב
{
"@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
}
]
}
ערך החזרה
רשימת תקופות התחזית.
GET_ForecastInstances
החזרת רשימת מופעי התחזית שהם רשומת ישות שורה אחת.
הערה
תקופות תחזית יכולות לכלול מופעי חיזוי רבים. הרבה יותר ממה שהיית רוצה למשוך למטה בבקשה אחת. נקודות הקצה של ה- API מספקות כברירת מחדל מספר מוגבל של פריטים לכל בקשה.
הערה: שאילתות גדולות עלולות לפגוע בביצועים, כך שמספר התוצאות בעמוד מוגבל ל- 4000 רשומות. אם ברצונך לאחזר יותר מ- 4000 רשומות, לדוגמה כדי לבנות רשימה בצד הלקוח של כל מופעי התחזית הזמינים, באפשרותך לשלוח בקשות API מרובות ולשלב את התוצאות בתוך היישום שלך.
דוגמה
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"}"
}
| פרמטר | סוג | Description |
|---|---|---|
WebApiName |
מחרוזת | שם ה-API |
RequestJson |
אובייקט JSON | מורכב מForecastPeriodIdמזהה ייחודי של תקופת התחזיתForecastConfigurationIdמזהה ייחודי של תצורת התחזיתSortingAttributeהתכונה שעל בסיסה ברצונך לבצע מיון בהחלפה.:SortingOrderASC עבור סדר עולה DSC עבור סדר יורד:PageSizeמספר הרשומות שברצונך לאחזר בעמוד בודד:PageNoעבור אילו רשומות עמוד ברצונך להביא.:GetParticipatingRecordsFetchXmlסמן בדגל המציין אם יש צורך ב- XML של אחזור רשומות משתתפות בתגובה.:ParticipatingRecordsViewIdזה נחוץ כאשר GetParticipatingRecordsFetchXml זה נכון.: זהו מזהה שאילתה (תצוגה) שמור שבאמצעותו נוצר XML של אחזור הרשומות המשתתפות. |
להלן הדוגמה JSON עבור RequestJson אובייקט.
{
"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\"}"
}
השב
{
"@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"
}
}
ערך החזרה
רשימה של מופעי תחזית.
Update_SimpleColumnByEntityId
מעדכן את ערכי העמודה הספציפיים באמצעות הערכים של הפרמטרים שהועברו.
הערה
מספר גדול של בקשות עדכון בקריאת API בודדת עלול לפגוע בביצועים, כך שהעדכונים לכל בקשה מוגבלים ל- 50.
דוגמה
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}]}"
}
| פרמטר | שם | Description |
|---|---|---|
| שם WebApiName | מחרוזת | שם ה-API |
| ForecastConfigurationId | GUID | מזהה תצורת תחזית |
| תחזיתRecurranceId | GUID | מזהה מופע חוזר של תחזית או מזהה תקופת תחזית רשימה של SimpleColumnUpdateRequests מערך |
| HierarchyEntityRecordId | GUID | EntityRecordId |
| ForecastConfigurationColumnId | GUID | מזהה עמודה של תצורת תחזית |
| ForecastConfigurationColumnValue | סוג נתונים של ForecastConfigurationColumn | ערך שצריך לעדכן אליו |
| IsRolledUpColumnUpdate(אופציונלי) | בוליאני |
True אם הערך מתעדכן עבור העמודה סיכום, False אם הערך הוא עדכון עבור עמודת צבירה |
השב
{
"@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"
}
]
}
ערך החזרה
רשימת רשומות המורכבת UpdateSimpleColumnByEntityResponse מ HierarchyEntityRecordId, ForecastConfigurationColumnId, Message, StatusCode.
Update_SimpleColumnByFIId
מעדכן את ערך העמודה הספציפית על-ידי הגדרת הערכים של הפרמטרים שהועברו.
הערה
מספר גדול של בקשות עדכון בקריאת API בודדת עלול לפגוע בביצועים, כך שהעדכונים לכל בקשה מוגבלים ל- 50.
דוגמה
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}]}"
}
| פרמטר | סוג | Description |
|---|---|---|
| שם WebApiName | מחרוזת | שם ה-API |
| ForecastConfigurationId | GUID | מזהה תצורת תחזית |
| תחזיתRecurranceId | GUID | מזהה מופע חוזר של תחזית או מזהה תקופת תחזית |
| SimpleColumnUpdateRequests | מערך | כולל את הפרטים הבאים |
| ForecastInstanceId | GUID | מזהה מופע תחזית |
| ForecastConfigurationColumnId | GUID | מזהה עמודה של תצורת תחזית |
| ForecastConfigurationColumnValue | סוג נתונים של ForecastConfigurationColumn | ערך שצריך לעדכן אליו |
| IsRolledUpColumnUpdate(אופציונלי) | בוליאני |
True אם הערך מתעדכן עבור העמודה סיכום, false אם הערך הוא עדכון עבור עמודת צבירה |
השב
{
"@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"
}
]
}
ערך החזרה
רשימת רשומות המורכבת UpdateSimpleColumnByEntityResponse מ ForecastInstanceId, ForecastConfigurationColumnId, Message, StatusCode.
GET_ParticipatingRecordsFetchxml
החזרת ה- XML לאחזור כדי לאחזר את הרשומות המשמשות כבסיס בתחזית.
דוגמה
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"
}
| פרמטר | סוג | Description |
|---|---|---|
| ForecastConfigurationId | GUID | מזהה תצורת תחזית |
| ForecastPeriodId | GUID | מזהה תקופת תחזית |
| HierarchyRecordId | GUID | מזהה הרשומה ב- Dataverse שעבורה יש לאחזר את הרשומה המשמשת כבסיס. לדוגמה, מזהה משתמש המערכת במקרה של תחזית תרשים ארגוני, או מזהה האזור במקרה של תחזית אזור. |
| ForecastInstanceId | GUID | מזהה מופע תחזית |
| ForecastConfigurationColumnId | GUID | מזהה עמודת התחזית שיש לאחזר. לדוגמה, כאשר ברצונך להביא רק את הרשומות המשתתפות עבור העמודה המקרה הטוב ביותר של התחזית שלך, הזן את מזהה העמודה של העמודה המקרה הטוב ביותר. באפשרותך להזין מזהה עמודה אחד בלבד עבור כל בקשה. כדי לאחזר עמודות נוספות, עליך לשלוח בקשה עבור כל עמודה. דלג על פרמטר זה אם ברצונך להביא XML עבור כל העמודות של התחזית. באפשרותך לקבל את מזהה העמודה מההגדרה תצורת תחזית . |
| מזהה RecordViewId | GUID | מזהה תצוגת רשומה של הרשומות המשמשות כבסיס. קבל מידע נוסף על קבלת מזהה התצוגה ב- savedquery EntityType |
| IsRolledUpNodeRequest | בוליאני | מציין אם להחזיר את הערכים עבור הצומת המסכם (קבוצה) או הצומת הבודד. אם מוגדר כ- true, כל הרשומות תחת צומת הקבוצה מוחזרות. אם מוגדר כ- false, מוחזרת רק הרשומה של אותו אדם. |
השב
{
"@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>"
}
ערך החזרה
שאילתת אחזור XML המחזירה את הרשומות המשמשות כבסיס בתחזית.