Bill is successfully created, however these 2 fields are missed
I can add them only via “Enter AP Bill” button
How to do same via request ?
Thanks in Advance
Page 1 / 1
Hi @Ivan
Add the addSubcontractLine action. Populate the field “SubcontractNbr” from Details
Try the below Json request with post call.
{
"entity": {
"ReferenceNbr": {
"value": "002962"
},
"Type": {
"value": "Bill"
}
},
"parameters": {
"SubcontractNbr": {
"value": "SC-000034"
}
}
}
Hi @Ivan
Add the addSubcontractLine action. Populate the field “SubcontractNbr” from Details
Try the below Json request with post call.
{
"entity": {
"ReferenceNbr": {
"value": "002962"
},
"Type": {
"value": "Bill"
}
},
"parameters": {
"SubcontractNbr": {
"value": "SC-000034"
}
}
}
I receive such error
{
"message": "An error has occurred.",
"exceptionMessage": "Bill.CashDiscountDate: 'Cash Discount Date' cannot be empty.\nBill.DueDate: 'Due Date' cannot be empty.\nBill.PostPeriod: Error: The 02-2023 financial period is inactive in the MISTICK company.\nBill.Terms: 'Terms' cannot be empty.\nBill.Vendor: 'Vendor' cannot be empty.\nBill.VendorRef: 'Vendor Ref.' cannot be empty.\n'VendorLocationID' cannot be empty.\nVendorLocationID: 'VendorLocationID' cannot be empty.",
"stackTrace": " at PX.Api.ContractBased.EntityService.GetOperationResult(EntityImpl entity, EntityExportContextBuilder entityExportContextBuilder, PXSYTable exportedKeys, PXOuterException contextError, Boolean throwOnError, Boolean addCancelCommand)\r\n at PX.Api.ContractBased.EntityService.Put(ISystemContract systemContract, String version, String name, EntityImpl entity, CbOperationContext operationContext, Boolean throwOnError)\r\n at PX.Api.ContractBased.Soap.SoapFacadeBase.PutImpl(EntityImpl entity, Boolean throwOnValidationError)\r\n at PX.Api.ContractBased.SystemContracts.V2.RestController.PutEntity(EntityImpl entity, String select, String filter, String expand, String custom)\r\n at lambda_method(Closure , Object , Objectr] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"
}
Is there any specials requirements to do this ?
Hi @Ivan
Add the addSubcontractLine action. Populate the field “SubcontractNbr” from Details
Try the below Json request with post call.
{
"entity": {
"ReferenceNbr": {
"value": "002962"
},
"Type": {
"value": "Bill"
}
},
"parameters": {
"SubcontractNbr": {
"value": "SC-000034"
}
}
}
There is also problem with 3 step that you have advised : “Make sure on the bills and adjustment screen, your newly created subcontact showing on the AddSubcontractline popup like below”
I tried to create new subcontract + tries to select the existing one but none of them is depicted it this section
Hi @Ivan
Add the addSubcontractLine action. Populate the field “SubcontractNbr” from Details
Try the below Json request with post call.
{
"entity": {
"ReferenceNbr": {
"value": "002962"
},
"Type": {
"value": "Bill"
}
},
"parameters": {
"SubcontractNbr": {
"value": "SC-000034"
}
}
}
Currently I have 2 problems :
as you suggested
“Make sure on the bills and adjustment screen, your newly created subcontact showing on the AddSubcontractline popup like below”
I tried to create new subcontract + tries to select the existing one but none of them is depicted it this section
I do not know why, but all bills are created with “closed”
Here is my request
{
"VendorRef": {
"value": "12343521"
},
"Hold": {
"value": true
},
"DueDate": {
"value": "3/2/2023"
},
"Vendor": {
"value": "V-02072"
},
"Date": {
"value": "1/31/2023"
},
"Terms": {
"value": "PWP"
},
"PostPeriod": {
"value": "01-2023"
}
}
Hi @Ivan 1 were you able to find a solution? Thank you!
Hi @Ivan 1 were you able to find a solution? Thank you!