Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Force Sales Order to Credit Management Hold

(2) ShareShare
ReportReport
Posted on by 727
Hi Guys,
 
I need to force through code the sales order credit management hold after inserting (I'm doing through CoC but that's not the problem). Looking classes about credit control, I found CredManCreditControl class; the problem is the class is abstract and It can't calls its methods.
 
Somebody can help me please to do it?
 
[ExtensionOf(classStr(SalesTableType))]
final class SalesTableType_AR_Extension
{
    void inserting()
    {
        SalesTable      salesTable;
        SalesTableType  salesTableType;
 
        next inserting();
 
        salesTableType = this;
        salesTable = salesTableType.parmSalesTable();
 
        if (salesTable.SalesId)
        {                       
            //Here force to credit management hold
        }
    }
}
Categories:
  • Verified answer
    Waed Ayyad Profile Picture
    Waed Ayyad 6,931 Super User 2024 Season 2 on at
    Force Sales Order to Credit Management Hold
    Hi,
     
    Yes, you are right the construct method is private. Try to use the following class :
     

  • Israel Gonzalez Profile Picture
    Israel Gonzalez 727 on at
    Force Sales Order to Credit Management Hold
    Hi Waed thanks for reply,
     
    That class can't be instanced.
     
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 6,931 Super User 2024 Season 2 on at
    Force Sales Order to Credit Management Hold
    Hi,
     
    There are many classes extendCredManCreditControl, based on your case you can call the methods that you want (public and protected) methods for the child classes
     
     
     
     
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Share Your Event with the Community

Jump start your event engagement! 📢

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,961 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,724 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans