You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used the BulkDeleteRequest sample code and able to submit the job successfully. I am using Dynamics Online. But When the job is submitted it will remain stuck or hung state "Waiting" till I will go and select manually resume the job. After manually resume, it is deleting the records. There is no other jobs are running so ideally it should be executed immediately.
What is the reason that job stuck in a waiting state?
Here is the code:
var deleteCondition = new ConditionExpression(
EntityName,IdentityColumn, ConditionOperator.In, "123");
// Create a fiter expression for the bulk delete request.
var deleteFilter = new FilterExpression();
deleteFilter.Conditions.Add(deleteCondition);
// Create the bulk delete query set.
var bulkDeleteQuery = new QueryExpression
{
EntityName = EntityName,
Distinct = false,
Criteria = deleteFilter
//ColumnSet = new ColumnSet(true)
};
// Create the bulk delete request.
var bulkDeleteRequest = new BulkDeleteRequest
{
JobName = "One Guid " + EntityName,
QuerySet = new[] { bulkDeleteQuery },
StartDateTime = DateTime.Now,
ToRecipients = new[] { userid },
CCRecipients = new Guid[] { },
SendEmailNotification = false,
RecurrencePattern = String.Empty
};
// Submit the bulk delete job.
// NOTE: Because this is an asynchronous operation, the response will be
// immediate.
var bulkDeleteResponse = (BulkDeleteResponse)organizationService.Execute(bulkDeleteRequest);
_asyncOperationId = bulkDeleteResponse.JobId;
The text was updated successfully, but these errors were encountered:
@anuxps The Timeout is set to 2 mins by default, try to change the default time and try it. We don't find any issue when we run from our end. Sometimes system jobs takes longer time for various reasons.
Thanks for contacting us. As we haven’t heard back from you, I am closing this issue. If you need further help, please reopen the issue or open a new issue.
I have used the BulkDeleteRequest sample code and able to submit the job successfully. I am using Dynamics Online. But When the job is submitted it will remain stuck or hung state "Waiting" till I will go and select manually resume the job. After manually resume, it is deleting the records. There is no other jobs are running so ideally it should be executed immediately.
What is the reason that job stuck in a waiting state?
Here is the
code:
The text was updated successfully, but these errors were encountered: