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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Updating Sales Order SalesType from "Journal" to "Order" via AIF

(0) ShareShare
ReportReport
Posted on by

Hello!

I am using an inbound AIF port to submit sales orders from our customer portal. Until these orders have been confirmed by sales staff, they sit in AX as "journal" type.

However, I am currently unable to update these orders through the AIF into full Sales Orders.

Here's an example update request - you can see I am only updating the SalesType field:

<soap:Envelope xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:wsdl="schemas.microsoft.com/.../services" xmlns:soap="schemas.xmlsoap.org/.../envelope">
	<soap:Body>
		<wsdl:SalesOrderServiceUpdateRequest>
			<EntityKeyList xmlns="schemas.microsoft.com/.../EntityKeyList">
				<EntityKey xmlns="schemas.microsoft.com/.../EntityKey">
					<KeyData>
						<KeyField>
							<Field>SalesId</Field>
							<Value>SO00000701</Value>
						</KeyField>
					</KeyData>
				</EntityKey>
			</EntityKeyList>
			<SalesOrder xmlns="schemas.microsoft.com/.../SalesOrder">
				<SalesTable class="entity" action="update">
					<_DocumentHash>c41d3f24ee53eca811402fa6b8129b82</_DocumentHash>
					<SalesType>Sales</SalesType>
				</SalesTable>
			</SalesOrder>
		</wsdl:SalesOrderServiceUpdateRequest>
	</soap:Body>
</soap:Envelope>

The Inbound document is received but nothing is updated. I have successfully updated other fields, but cannot update the SalesType field.

Just for posterity's sake - I manually updated an example order to Sales Order in the AX GUI and also attempted to change it to Journal type using AIF - and received the same result. No go.

What am I missing?

*This post is locked for comments

I have the same question (0)
  • Mea_ Profile Picture
    60,284 on at

    Hey ERiley,

    If you already have another SO with same CustAccount  and PurchOrderFormNum AIF will set order type to journal.

    Also if SO invoice account is not equal to customer invoice account AIF will update SO type to journal.

    You can put breakpoint in AxdSalesOrder.prepareSalesTable() to see if you are hitting this conditions.

  • Community Member Profile Picture
    on at

    Hi Ievgen,

    Would that still apply if I am trying to **update** an existing order? I am not trying to create a new one with the same info, simply update in place.

  • Mea_ Profile Picture
    60,284 on at

    Yep, from update or create.

  • Community Member Profile Picture
    on at

    I can swap the SalesType in the GUI without a problem, though.

    And it doesn't let me update the PO # along with the order type because any request containing SalesType fails.

  • Mea_ Profile Picture
    60,284 on at

    This logic exists only for AIF. Did you check if you have another order that meet criteria I described in previous post ?

  • Community Member Profile Picture
    on at

    I updated to a completely random PO # and tried again, same result :(

    The Fields CustAccount and InvoiceAccount are also the same (they match).

  • Mea_ Profile Picture
    60,284 on at

    You always can try to debug :)

    technet.microsoft.com/.../jj710372.aspx

  • Verified answer
    Community Member Profile Picture
    on at

    For anyone else attempting this, DON'T.

    There's apparently a very good reason that AX doesn't readily allow the transition of orders from Journal to Sales orders without other processing.

    We found a workaround to make this transition happen based on another field and a batch job, but when we did so it only updated the type in the order header (which meant the lines could not be worked on in the warehouse). It also did not create the necessary inventory transactions to reserve or allocate inventory.

    Figure out a different way to hold orders if you need to.

    We changed to using the "MCROrderStopped" parameter.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans