web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Error On Posting Sales Order

(1) ShareShare
ReportReport
Posted on by 22
I am trying to post sales order through API. I am already creating a customer through API and when I am associating that created customer in the sales order post body 
I am getting this error code: 'Application_FieldValidationException', message: 'D394 Partner type. must not be in Customer: No.=CI00088 CorrelationId: 26f438d2-a6ab-4a77-9af0-a068d2437dba.'.
 
While Creating customer I am not passing any partner type, Hence how may I getting this error ? Also what is this error ?

 
I have the same question (0)
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,137 Super User 2025 Season 2 on at
    Error On Posting Sales Order
    Agree with the previous response, The error indicates that the Partner Type field on the customer record must be set to a valid value ("Person" or "Company"). Try to create manually sales order and check.
  • KasparsSemjonovs Profile Picture
    4,661 Super User 2025 Season 2 on at
    Error On Posting Sales Order
    Well the error states tat the Partner Type cannot be empty. In customer card this field can have 3 options - empty, person or Company. 

    I assume there is another modification on your system, that is blocking this. 
    Have You tried to create manually a sales order for such customer, where Partner Type = Empty ? I would guess that You would receive the same error, that Partner Type cannot be empty.
  • ST-01080727-0 Profile Picture
    22 on at
    Error On Posting Sales Order
    I have successfully created the customer and the response I am getting is this 

    {
    '@odata.context': 'https://api.businesscentral.dynamics.com/v2.0/3d32adac-7e5f-408d-9a7c-58ceceab2992/Production/api/v2.0/$metadata#companies(b1f1d8e7-0569-ee11-8def-6045bd92d4b1)/customers/$entity',
    '@odata.etag': 'W/"JzE5OzEwMDgyODYyMjQyODI3OTU1NzcxOzAwOyc="',
    id: 'XXXYYYZZZ',
    number: 'XXXYYYYZZZZ',
    displayName: 'Skriware',
    type: 'Company',
    addressLine1: '',
    addressLine2: '',
    city: '',
    state: '',
    country: '',
    postalCode: '',
    phoneNumber: 'XXXYYYZZZZ',
    email: '',
    website: '',
    salespersonCode: '',
    balanceDue: 0,
    creditLimit: 0,
    taxLiable: false,
    taxAreaId: '00000000-0000-0000-0000-000000000000',
    taxAreaDisplayName: '',
    taxRegistrationNumber: '',
    currencyId: 'XXXXYYYYZZZZZ',
    currencyCode: 'CAD',
    paymentTermsId: 'XXXXYYYYYZZZZZ',
    shipmentMethodId: '00000000-0000-0000-0000-000000000000',
    paymentMethodId: '00000000-0000-0000-0000-000000000000',
    blocked: '_x0020_',
    lastModifiedDateTime: '2024-07-31T13:09:35.937Z'
    }

    But when I am trying to associate this customer in the sales post body 
    {

    customerId: 'XXXYYYZZZZ',
    currencyCode: 'EUR',
    orderDate: '2024-07-31',
    postingDate: '2024-07-31',
    salesOrderLines: [
    {
    itemId: '0defc956-d7f8-ee11-a1ff-000d3a48a433',
    lineType: 'Item',
    lineObjectNumber: 'B.112',
    description: 'Fable Explore 2.5 Educational Robot',
    quantity: '1.00',
    unitPrice: '637.00',
    discountPercent: '0.00'
    },
    {
    itemId: '0eefc956-d7f8-ee11-a1ff-000d3a48a433',
    lineType: 'Item',
    lineObjectNumber: 'B.113',
    description: 'Fable Go 2.5 Educational Robot',
    quantity: '1.00',
    unitPrice: '637.00',
    discountPercent: '0.00'
    }
    ]
    }

    I am getting this error 

    error: {
    code: 'Application_FieldValidationException',
    message: 'D394 Partner type. must not be in Customer: No.=CI00088 CorrelationId: 26f438d2-a6ab-4a77-9af0-a068d2437dba.'
    }

    We are simply creating a customer without adding any partner type and then using that customer in our sales order 
    What is this error D394 Partner Type ? and how it is connected to customer ?


     
  • Mohana Yadav Profile Picture
    60,949 Super User 2025 Season 2 on at
    Error On Posting Sales Order
    Can you create a SO and post manually using the customer created via API?
    Looks like there is a customization which is expecting some value except blank in partner type field.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,132

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 3,615

#3
Sumit Singh Profile Picture

Sumit Singh 2,912

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans