cancel
Showing results for 
Search instead for 
Did you mean: 

how to change a document from draft to purchase request in service layer

Christian111
Discoverer
0 Kudos
133

Hi, I am creating purchase request drafts using the Drafts endpoint in the Service Layer. However, when I try to convert them into a purchase request document using the DraftsService_SaveDraftToDocument endpoint, they remain as drafts and do not convert.

Json for draft creation

 

{
  "DocType": "dDocument_Items",
  "RequesterName": "Samuel",
  "DocCurrency": "$",
  "DocRate": 1,
  "Comments": "test",
  "DocDate": "2024-07-29",
  "DocDueDate": "2024-08-29",
  "TaxDate": "2024-07-29",
  "DocumentStatus": "bost_Open",
  "Requester": "manager",
  "Confirmed": "tYES",
  "DocObjectCode": "oPurchaseRequest",
  "JournalMemo": "Purchase request -",
  "SummeryType": "dNoSummary",
  "ApplyCurrentVATRatesForDownPaymentsToDraw": "tNO",
  "RequriedDate": "2024-07-29",
  "RequesterEmail": "test@example.com",
  "Series": 62,
  "DocumentLines": [
    {
      "ItemCode": "SE01A-01C",
      "ItemDescription": "BASTIDOR",
      "Quantity": 2,
      "Currency": "",
      "WarehouseCode": "BOPCC",
      "AccountCode": "14050501",
      "CostingCode": "1",
      "ProjectCode": "109177",
      "CorrectionInvoiceItem": "ciis_ShouldBe",
      "MeasureUnit": "UNIT",
      "UnitsOfMeasurment": 1,
      "TaxPercentagePerRow": 19,
      "LineStatus": "bost_Open",
      "LineType": "dlt_Regular",
      "CostingCode2": "109177",
      "RequiredDate": "2024-07-29"
    }
  ]
}

 

Christian111_0-1722958606156.png

Send from draft to purchase requisition with DraftsService_SaveDraftToDocument endpoint

 

{
  "Document": {
    "DocDueDate": "2024-08-29",
    "DocEntry": "6975"
  }
}

 

Christian111_1-1722958673325.png

but still appears in drafts

Christian111_0-1722958839766.png

 

Accepted Solutions (0)

Answers (0)