Question

Two columns are not added to Bill Deatils

  • 13 February 2023
  • 6 replies
  • 45 views

Userlevel 4
Badge +2

Hi,

My application generates REST request which is used for creating Bills

This is my request for creating Bill

URL : https://mcicj.acumatica.com/entity/ARTSDocAlphaEndpoint/20.200.001/Bill

Body :

{

  "VendorRef": {

    "value": "1ABL-217i941"

  },

  "DueDate": {

    "value": "3/2/2023"

  },

  "Vendor": {

    "value": "V-06702"

  },

  "Date": {

    "value": "1/31/2023"

  },

  "Terms": {

    "value": "PWP"

  },

  "PostPeriod": {

    "value": "01-2023"

  },

  "Details": [

    {

      "Description": {

        "value": "Line 001 - Gypcrete"

      },

      "Qty": {

        "value": 1

      },

      "UnitCost": {

        "value": "34573.2"

      },

      "ExtendedCost": {

        "value": "34573.2"

      },

      "Account": {

        "value": "5430"

      },

      "SubcontractLine": {

        "value": "1"

      },

      "SubcontractNbr": {

        "value": "234567"

      },

      "rowNumber": {

        "value": "1"

      }

This request is fully workable.

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


6 replies

Userlevel 4
Badge +2

Hi @Ivan 1 were you able to find a solution? Thank you!

No, currently its still now working

Userlevel 7
Badge

Hi @Ivan 1 were you able to find a solution? Thank you!

Userlevel 4
Badge +2

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 :

  1. 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

    1. 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"

        }

        

        

      }

Userlevel 4
Badge +2

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

 

Userlevel 4
Badge +2

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.",

    "exceptionType": "PX.Api.ContractBased.OutcomeEntityHasErrorsException",

    "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 , Object[] )\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 ? 

Userlevel 7
Badge +11

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"

            }

     

        }

    }

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