---
title: "Marking and reservation transactions in AX 2012 and D365O"
canonical: https://ontargit.com/marking-and-reservation-transactions-in-ax-2012-and-d365o-2/
date: 2021-07-12 13:17:11
description: "Marking and reservation transactions in Dynamics AX 2012 and Microsoft Dynamics 365 for Operations through the user interface."
keywords: "reservation transactions"
categories: [Tech article]
---

I would like to explain the marking and reservation transactions through the user interface.

## Dynamics AX 2012

Check reservation transactions  – for example open the form Transactions from the Transfer order.

To do this, follow the steps below

- __
1.Open the form by the link** _Inventory management / Periodic / Transfer Orders_**

- __

2. At the bottom of the form on the Tab Lines, click **_Inventory / Transactions_**

_

- _

3. To open the **Marking** form click **_Inventory / Marking._**

- __
4. You need to activate **“Set mark now”** check box for marking and click **Apply**.

_

After that, you will see a green sign indicating the marking.

On the **Transactions** form on the **General tab**, the field **Reference lot** will not be empty.

## Dynamics 365 FO

For example open the form **Transactions **from the** Sales order. **

To do this, follow the steps below

- _
1.Open the form by the link** _Account receivable / Orders / All sales orders / Edit_**

- __
2. At the **Sales orders lines** tab of the form, click **_Inventory / Marking_**

_

- _
3. You need to activate **“Set mark now”** check box for marking and click **Apply**.

_

You can use this code to mark transactions throw X ++.

Or you can use this code to mark

Copy to Clipboard
Syntax Highlighterpublic static void setMark(

InventTransId   _inventTransId,

InventTransId   _refInventTransId,

InventQty        _qtyTomark)

{

TmpInventTransMark         tmpInventTransMask;

Map                                    mapMarkNow;

InventDim                           inventDim;

InventTransOrigin               inventTransOrigin;

InventTrans                                    inventTrans;

container                             con;

Map                                    mapTmp;

MapEnumerator                  mapEnumerator;

InventTransOriginId            issueInventTransOriginId;

InventTransOriginId            receiptInventTransOriginId;

InventQty                               qtyToMark;

issueInventTransOriginId   = InventTransOrigin::findByInventTransId(_inventTransId).RecId;

receiptInventTransOriginId = InventTransOrigin::findByInventTransId(_refInventTransId).RecId;

qtyToMark                             = _qtyTomark;

while select inventDim

join Qty from inventTrans

where inventTrans.inventDimId == inventDim.inventDimId

join RecId from inventTransOrigin

where inventTransOrigin.RecId         == inventTrans.InventTransOrigin

&amp;&amp; inventTransOrigin.InventTransId == _inventTransId

{

[con] = TmpInventTransMark::packTmpMark(

InventTransOrigin::find(issueInventTransOriginId),

inventDim,

inventTrans.Qty);

mapTmp        = Map::create(con);

mapEnumerator = mapTmp.getEnumerator();

while (mapEnumerator.moveNext())

{

tmpInventTransMask = mapEnumerator.currentValue();

if (tmpInventTransMask.InventTransOrigin == receiptInventTransOriginId)

{

tmpInventTransMask.QtyMarkNow = tmpInventTransMask.Qty;

tmpInventTransMask.QtyRemain -= tmpInventTransMask.QtyMarkNow;

qtyToMark -= tmpInventTransMask.QtyMarkNow;

mapMarkNow = new Map(Types::Int64, Types::Record);

mapMarkNow.insert(tmpInventTransMask.RecId, tmpInventTransMask);

TmpInventTransMark::updateTmpMark(

issueInventTransOriginId,

inventDim,

-tmpInventTransMask.Qty,

mapMarkNow.pack());

if (!qtyToMark)

{

break;

}

}

}

}

}

If you want to unmark transactions, you can use this code

Copy to Clipboard
Syntax Highlighterpublic static void unMark(InventTransId _inventTransId, InventTransId _refInventTransId, InventQty _qty)

{

InventTransOrigin::deleteMarking(

InventTransOrigin::findByInventTransId(_inventTransId).RecId,

InventTransOrigin::findByInventTransId(_refInventTransId).RecId,

_qty);

}

[](https://ontargit.com/en/microsoft-dynamics-365-ontargit/dynamics-finance/)

### Dynamics 365 Finance

Increase the speed of operating your business with the complete ERP tools to help you grow at your own pace.

[More details_](https://ontargit.com/en/microsoft-dynamics-365-ontargit/dynamics-finance/)

[](https://ontargit.com/en/dynamics-ax/)

[_](https://ontargit.com/en/dynamics-ax/)

### Dynamics AX 2012

Successfully support, transform and improve business processes in dynamic, growing companies.

[More details_](https://ontargit.com/en/dynamics-ax/)

## Reservation Dynamics AX 2012

To make reservation transactions in the form **Transactions** follow the steps below

- __

1.Click  **_Inventory / Reservation _**to open the reservation from

_

- _

2. Enter the quantity in the field **Reservation**

- __
3. Click** Reserve lot **or** Reserve line**

_

As a result status of the transaction will change to **Reserve physical** or **Reserve ordered**.

## Reservation D365 FO

To reserve in the form **Sales order** follow the steps below

- _

1.Click  **_Inventory / Reservation _**to open the reservation from

_

- _

2. Enter the quantity in the field **Reservation**

- __
3. Click** Reserve lot**

_

You can use this code to reserve transactions throw X ++.

Copy to Clipboard
Syntax Highlighterpublic static void reserve(InventTransId _inventTransId)

{

InventTrans             inventTrans;

InventTransOrigin       inventTransOrigin;

InventMovement          inventMovement;

InventUpd_Reservation   inventUpd_Reservation;

while select inventTrans

where  inventTrans.StatusReceipt == StatusReceipt::None

&amp;&amp;  inventTrans.StatusIssue   == StatusIssue::OnOrder

join RecId from inventTransOrigin

where inventTransOrigin.RecId             == inventTrans.InventTransOrigin

&amp;&amp; inventTransOrigin.InventTransId     == _inventTransId

&amp;&amp; inventTransOrigin.ReferenceCategory != InventTransType::Sales

{

Inventmovement        = inventTrans.inventmovement(true);

inventUpd_Reservation = InventUpd_Reservation::newInventDim(inventmovement, inventTrans.inventDim(), inventTrans.Qty, false);

inventUpd_Reservation.updatenow();

}

}

You can use this code to unreserve transactions throw X ++.

Copy to Clipboard
Syntax Highlighterpublic static void unreserve(InventTransId _inventTransId)

{

InventTrans             inventTrans;

InventTransOrigin       inventTransOrigin;

InventMovement          inventMovement;

InventUpd_Reservation   inventUpd_Reservation;

while select inventTrans

where  inventTrans.StatusIssue == StatusIssue::ReservPhysical

|| inventTrans.StatusIssue == StatusIssue::ReservOrdered

join RecId from inventTransOrigin

where inventTransOrigin.RecId         == inventTrans.InventTransOrigin

&amp;&amp; inventTransOrigin.InventTransId == _inventTransId

{

Inventmovement        = inventTrans.inventmovement(true);

inventUpd_Reservation = InventUpd_Reservation::newInventDim(inventmovement, inventTrans.inventDim(), -inventTrans.Qty, false);

inventUpd_Reservation.updatenow();

}

}

## Reserve ordered

If you want to reserve ordered items You should active check box **_Inventory management &gt; Setup &gt; Inventory management parameters &gt; General-&gt;Reserve ordered items_**

First you should mark selected transactions and then do reservation. Notice! Inventory dimensions must be the same for selected transactions.

For example you can reserve items from purchase or transfer orders.

If the reservation is successful, The transaction status will change to the **Reserve ordered**.

_

_

## The great force to understand and solve the management challenges

[**ERP technology** ](https://ontargit.com/en/services-ontargit/erp-implementation-ontargit/)can help you integrate your business processes in a better way. Connecting business processes, systems and data gives you the intelligence, acceleration, and adaptability you need to optimize your operations. [Microsoft Dynamics 365](https://ontargit.com/en/microsoft-dynamics-365-ontargit/) is built to adapt to your needs and grow with you, so you can be proactive and respond quickly to any disruption or market change.

[Free consultation_](https://ontargit.com/en/ontargit-contacts/)