Skip to main content
Solved

Create Invoice via REST request

  • Feb 2, 2023 2:46 PM UTC
  • 7 replies
  • 899 views
  • Translate All

Forum|alt.badge.img+2

Hi,

My application generates REST requests for creates invoices creation

It is working except one moment

Our client has added custom entity

There is opportunity to create Bill based on this subcontract, when I am doing this in Acumatica interface everything works fine

 I added those fields to endpoint

and now trying to do same with rest request 

Here is my request :

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 workable and bill is successfully created 

However, only these new fields are not present in Acumatica

How to send these values to Acumatica, what should be done ?

Thanks in advance 

Best answer by Dmitrii Naumov

@Ivan

see T series dev trainings, e.g. 

https://openuni.acumatica.com/courses/development/t230-development-actions/

View original

7 replies

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7

Hi @Ivan is that field enabled on the screen? is it a selector field or just a plain text field?

Translate

Forum|alt.badge.img+2
  • Author
  • Varsity I
  • Feb 2, 2023 3:06 PM UTC

Hi @Ivan is that field enabled on the screen? is it a selector field or just a plain text field?

Hi @Dmitrii Naumov 

It looks same as other columns

How to check if this filed is enabled on screen and it’s type ?

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7

Well, if you work with it via UI, can you just enter any value in this field? I assume you cannot, can you?

Translate

Forum|alt.badge.img+2
  • Author
  • Varsity I
  • Feb 2, 2023 3:13 PM UTC

Well, if you work with it via UI, can you just enter any value in this field? I assume you cannot, can you?

No, I can’t

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7

Well, that is why you cannot do it via API as well. 

You’ll probably need some custom action to link the line to subcontract.

Translate

Forum|alt.badge.img+2
  • Author
  • Varsity I
  • Feb 2, 2023 3:32 PM UTC

Well, that is why you cannot do it via API as well. 

You’ll probably need some custom action to link the line to subcontract.

Can you provide a link to documentation, where it is described how to do that 

Translate

Dmitrii Naumov
Community Manager
Forum|alt.badge.img+7
  • Community Manager
  • Answer
  • Feb 2, 2023 4:02 PM UTC