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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
FastTrack for Dynamics 365 forum

To create Quality order for BOM Item

(0) ShareShare
ReportReport
Posted on by 44
Hi Experts,
 
I am trying to create Quality order for BOM Item.
As per my requirements I need to do Quality Association stuff for BOM items. I need to create the Quality order at the time of BOM registration.
 
 
 
I have added following code to include BOM items:
 
[ExtensionOf(classStr(InventQualityManagementCreateHandler))]
final class DT_InventQualityManagementCreateHandler_Extension
{
    public static void createInventoryRegistration(InventTransOriginId             _inventTransOriginId,
        InventReceiptForTestRegistrator _inventReceiptForTestRegistrator)
    {
        next createInventoryRegistration(_inventTransOriginId,_inventReceiptForTestRegistrator);
        if (!InventParameters::find().UseQualityManagement)
        {
            return;
        }
        // This can happen when all transactions were updated from the statue Registered to the status Received
        if (!_inventReceiptForTestRegistrator || _inventReceiptForTestRegistrator.parmTotalReceiptQuantity() == 0)
        {
            return;
        }
        InventTransOrigin inventTransOrigin = InventTransOrigin::find(_inventTransOriginId);
        var set = InventQualityManagementCreateHandler::inventTransTypesSupportingInventoryRegistrationReCheck();
        if (!set.in(inventTransOrigin.ReferenceCategory))
        {
            return;
        }
        InventQualityManagementCreate::createOnRegistration(
            inventTransOrigin,
            _inventReceiptForTestRegistrator);
    }
    private static Set inventTransTypesSupportingInventoryRegistrationReCheck()
    {
        Set inventTransTypeSet = new Set(Types::Enum);
        inventTransTypeSet.add(InventTransType::Purch);
        inventTransTypeSet.add(InventTransType::PmfProdCoBy);
        inventTransTypeSet.add(InventTransType::Production);
        inventTransTypeSet.add(InventTransType::BOMLine);
        inventTransTypeSet.add(InventTransType::BOMMain);
        //InventQualityManagementCreateHandler::inventTransTypesSupportingInventoryRegistrationDelegate(inventTransTypeSet);
        return inventTransTypeSet;
    }
}
 
But i am getting error at the following method  as it is going to highlighted loop when running for BOM item:
 
 
Please suggest what steps i need to follow to rectify it or is there any other way around to create Quality order for BOM Item.
 
Thanks in advance.
 
Best Regards,
Rajat Agarwal
Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > FastTrack for Dynamics 365

#1
GyozoBarci Profile Picture

GyozoBarci 4

#1
MiMissel Profile Picture

MiMissel 4

#3
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 3

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans