Question

How do I mark a project task as COMPLETE?

  • 12 March 2024
  • 8 replies
  • 72 views

Badge

I have a project with two tasks on it. Both tasks are active. I am using REST API to mark the task as complete. I keep getting an error that says “The Complete Button is disabled

This message is misleading as the button is very much enabled on the UI.
Please see screenshots.

  1. Call from Postman
    Complete button on task.

     


8 replies

Userlevel 7
Badge +4

Hey @abhijit,

Testing in local, using the Default 22.200.001 endpoint it works as expected.

From the screenshot, Complete action is enabled and it should work. Taking a closer look at the request payload(TaskID ends with 83), I see you are using a different TaskID than the one in the UI(TaskID ends with 84).

Please try using the right TaskID in the request payload and that should be it. Good Luck,

Badge

Hey @abhijit,

Testing in local, using the Default 22.200.001 endpoint it works as expected.

From the screenshot, Complete action is enabled and it should work. Taking a closer look at the request payload(TaskID ends with 83), I see you are using a different TaskID than the one in the UI(TaskID ends with 84).

Please try using the right TaskID in the request payload and that should be it. Good Luck,

Hey @Vignesh Ponnusamy I have tried to close both tasks with the same results. I understand I may have posted the second screenshot. I keep getting the error message. I tried to start profiling, but the error logged in the profiler is cryptic.

at PX.Data.PXFirstChanceExceptionLogger.ProfilerFirstChanceException(Object o, FirstChanceExceptionEventArgs args) at PX.Api.SyImportProcessor.SyStep.CommitChangesInt(Object itemToBypass, PXFilterRow[] targetConditions, PXFilterRow[] filtersForAction, SyImportRowResult importResult) at PX.Api.SyImportProcessor.SyStep.CommitChanges(Object & itemToBypass, PXFilterRow[] targetConditions, PXFilterRow[] filtersForAction) at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable(CancellationToken token) at PX.Api.ContractBased.EntityService.Put(ISystemContract systemContract, String version, String name, EntityImpl entity, CbOperationContext operationContext, Boolean throwOnError) at PX.Api.ContractBased.Soap.SoapFacadeBase.PutImpl(EntityImpl entity, Boolean throwOnValidationError) at PX.Api.ContractBased.SystemContracts.V2.RestController.PutEntity(EntityImpl entity, String select, String filter, String expand, String custom) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Controllers.ApiControllerActionInvoker.InvokeActionAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken) at System.Web.Http.Controllers.ApiControllerActionInvoker.InvokeActionAsync(HttpActionContext actionContext, CancellationToken cancellationToken) at System.Web.Http.Controllers.ActionFilterResult.<>c.<ExecuteAsync>b__5_0(ActionInvoker innerInvoker) at System.Web.Http.Controllers.ActionFilterResult.<>c__DisplayClass7_0`1.<InvokeActionWithActionFilters>b__0() at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation) at System.Web.Http.Filters.ActionFilterAttribute.System.Web.Http.Filters.IActionFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecutedAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Filters.ActionFilterAttribute.ExecuteActionFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation) at System.Web.Http.Filters.ActionFilterAttribute.System.Web.Http.Filters.IActionFilter.ExecuteActionFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation) at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Controllers.ActionFilterResult.ExecuteAsync(CancellationToken cancellationToken) at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Filters.AuthorizationFilterAttribute.ExecuteAuthorizationFilterAsyncCore(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation) at System.Web.Http.Filters.AuthorizationFilterAttribute.System.Web.Http.Filters.IAuthorizationFilter.ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func`1 continuation) at System.Web.Http.Controllers.AuthorizationFilterResult.ExecuteAsync(CancellationToken cancellationToken) at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Controllers.ExceptionFilterResult.ExecuteAsync(CancellationToken cancellationToken) at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken) at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Autofac.Integration.WebApi.Owin.DependencyScopeHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Web.Http.HttpServer.<SendAsync>d__24.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Web.Http.Owin.HttpMessageHandlerAdapter.<InvokeCore>d__20.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Owin.HttpMessageHandlerAdapter.InvokeCore(IOwinContext context, IOwinRequest owinRequest, IOwinResponse owinResponse) at System.Web.Http.Owin.HttpMessageHandlerAdapter.<InvokeCore>d__20.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at System.Web.Http.Owin.HttpMessageHandlerAdapter.InvokeCore(IOwinContext context, IOwinRequest owinRequest, IOwinResponse owinResponse) at PX.Logging.Enrichers.OwinExtensions.<>c.<<DisableAspNetCallbackEnricher>b__0_0>d.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at PX.Logging.Enrichers.OwinExtensions.<>c.<DisableAspNetCallbackEnricher>b__0_0(IOwinContext ctx, Func`1 next) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>d__3.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.<Invoke>d__3.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.<Invoke>d__3.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Builder.StackOverflowGuardApplicationBuilderExtensions.<>c.<<UseAsyncStackOverflowGuard>b__0_0>d.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at Microsoft.AspNetCore.Builder.StackOverflowGuardApplicationBuilderExtensions.<>c.<UseAsyncStackOverflowGuard>b__0_0(HttpContext httpContext, Func`1 next) at PX.AspNetCore.Owin.ApplicationBuilderExtensions.<>c.<<UseScreenIdFromRequest>b__2_0>d.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at PX.AspNetCore.Owin.ApplicationBuilderExtensions.<>c.<UseScreenIdFromRequest>b__2_0(HttpContext context, Func`1 next) at PX.AspNetCore.Owin.ApplicationBuilderExtensions.<>c.<<UseRouteConstraintValidation>b__1_0>d.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at PX.AspNetCore.Owin.ApplicationBuilderExtensions.<>c.<UseRouteConstraintValidation>b__1_0(HttpContext context, Func`1 next) at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c.<<UseSessionContextFactory>b__6_0>d.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c.<UseSessionContextFactory>b__6_0(ISessionContextFactory sessionContextFactory, HttpContext httpContext, Func`1 next) at PX.Telemetry.TelemetryOwinRegistration.<PreRequestHandlerExecute>d__6.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at PX.Telemetry.TelemetryOwinRegistration.PreRequestHandlerExecute(HttpContext context, Func`1 next) at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.<RunApp>d__7.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine & stateMachine) at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.RunApp(Func`2 entryPoint, IDictionary`2 environment, TaskCompletionSource`1 tcs, StageAsyncResult result) at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.BeginEvent(Object sender, EventArgs e, AsyncCallback cb, Object extradata) at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean & completedSynchronously) at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error) at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb) at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus & notificationStatus) at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus & notificationStatus) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

Userlevel 7
Badge +4

Hi @abhijit,

Can you please the Acumatica version and build you are using? Are you able to complete the task from the UI? Also is the issue reproducible without any customization?

Badge

I am able to do the task from the UI without any issues. I cannot undo the customizations in this instance of acumatica. 

Userlevel 7
Badge +4

Hi @abhijit,

That’s strange.! If you are able to complete the action from the UI most likely it should work from API, unless you have some custom logic in graph extension that is specific to the API calls. Can share a simplified customization package(with any related graph extension and endpoint extension) using which we could reproduce the issue?

Badge

Is there any mechanism to pause customizations in the instance of acumatica? That could help me narrow down the problem

Userlevel 7
Badge +4

I don’t think so, the other option to get more details about the issue is to enable logging from the Request Profiler(SM205070) screen.

You can enable debugging right before reproducing the issue, so we might more information about what could be the issue.

For details on Request Profiler screen kindly check, https://help.acumatica.com/(W(2))/Help?ScreenId=ShowWiki&pageid=4b2b51fa-eae3-4102-b1f2-d7ee96145174

Pleas note logging could be verbose and can slowdown the instance, you can enable for a shore period of time just to collect and check the logs.

Note: Once you reproduce the issue check the Exception tab and Request tab this can give some idea of what’s happening in the backend.

Badge

I have these two logs from the profiling activity. The excel file has the exceptions exported. 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved