Table of Contents

API - Sales Credit Memos

This is a fork of page 30038 "APIV2 - Sales Credit Memos" from version 27.0.38460.40573. Added support for Extra Values.

Object Definition

Object TypePage
Object ID70314159
Object NameQWESR API - Sales Credit Memos
Source TableSales Cr. Memo Entity Buffer

API Definition

APIPublishersmartApps
APIGroupspider
APIVersionv1.0
EntitySetNamesalesCreditMemos
EntityNamesalesCreditMemo

Service Enabled Procedures

Name Description
Cancel(WebServiceActionContext) Cancels a already posted Credit Memo.
CancelAndSend(WebServiceActionContext) Cancels and sends the current Credit Memo.
Post(WebServiceActionContext) Posts the current Credit Memo.
PostAndSend(WebServiceActionContext) Posts and sends the current Credit Memo to customer.
Release(WebServiceActionContext) Releases the current Credit Memo.
Reopen(WebServiceActionContext) Reopens the current Credit Memo.
Send(WebServiceActionContext) Sends the current Credit Memo to the customer.

Events

Name Description
OnAfterInsert(Record "Sales Cr. Memo Entity Buffer"; Record "Sales Header"; Text; Text; Text; Text; Text; Text; Text; Text; Text; Text; List of [Integer]) Raised after a record is inserted.
OnAfterModify(Record "Sales Cr. Memo Entity Buffer"; Record "Sales Header"; Text; Text; Text; Text; Text; Text; Text; Text; Text; Text; List of [Integer]) Raised after a record is modified.
OnGetPostedSalesCreditMemoExtraValues(Record "Sales Cr. Memo Entity Buffer"; Record "Sales Cr.Memo Header"; Text; Text; Text; Text; Text; Text; Text; Text; Text; Text) Raised after a record is read from the database. This event is raised if the Credit Memo is posted. Makes it possible to set the ExtraValues 1..10, to be returned to the client.
OnGetSalesCreditMemoExtraValues(Record "Sales Cr. Memo Entity Buffer"; Record "Sales Header"; Text; Text; Text; Text; Text; Text; Text; Text; Text; Text) Raised after a record is read from the database. This event is raised if the Sales Credit Memo is not posted. Makes it possible to set the ExtraValues 1..10, to be returned to the client.

Example

Read

Get a list of Sales Credit Memos.

GET businesscentralPrefix/companies({id})/salesCreditMemos?$schemaversion=2.0

Get a single Sales Credit Memo and it's lines.

GET businesscentralPrefix/companies({id})/salesCreditMemos({id})?$expand=salesCreditMemoLines&$schemaversion=2.0

Create

Create a new Sales Credit Memo and a Sales Credit Memo Line.

POST businesscentralPrefix/companies({id})/salesCreditMemos?$expand=salesCreditMemoLines&$schemaversion=2.0
Content-type: application/json
{
   "customerNumber": "10000",
   "salesCreditMemoLines": [
       {
           "lineType": "Item",
           "lineObjectNumber": "1896-S",
           "quantity": 5
   	    }
   ]
}

Controls

Type Name Data Type Read-only
Field id Yes
Field number Yes
Field externalDocumentNumber
Field creditMemoDate
Field postingDate
Field dueDate
Field customerId
Field customerNumber
Field customerName Yes
Field billToName Yes
Field billToCustomerId
Field billToCustomerNumber
Field sellToAddressLine1
Field sellToAddressLine2
Field sellToCity
Field sellToCountry
Field sellToState
Field sellToPostCode
Field billToAddressLine1
Field billToAddressLine2
Field billToCity
Field billToCountry
Field billToState
Field billToPostCode
Field shortcutDimension1Code
Field shortcutDimension2Code
Field currencyId
Field currencyCode Text
Field paymentTermsId
Field shipmentMethodId
Field salesperson
Field pricesIncludeTax Yes
Sub page dimensionSetLines
Sub page salesCreditMemoLines
Sub page pdfDocument Yes
Field discountAmount
Field discountAppliedBeforeTax Yes
Field totalAmountExcludingTax Yes
Field totalTaxAmount Yes
Field totalAmountIncludingTax Yes
Field status Yes
Field lastModifiedDateTime Yes
Field invoiceId Guid
Field invoiceNumber
Field phoneNumber
Field email
Field customerReturnReasonId
Field extraValue1 Text
Field extraValue2 Text
Field extraValue3 Text
Field extraValue4 Text
Field extraValue5 Text
Field extraValue6 Text
Field extraValue7 Text
Field extraValue8 Text
Field extraValue9 Text
Field extraValue10 Text
Sub page attachments
Sub page documentAttachments

This documentation is generated from Spider v27.4