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 :
Finance | Project Operations, Human Resources, ...
Answered

How to extend PurchLine table initValue() method getting Hookable error in D365FO

(0) ShareShare
ReportReport
Posted on by 632

Dear Friends,

While extend  PurchLine table, initValue() method using CoC getting below error.

Wrapping method 'initValue' marked with attribute Hookable set to 'false' is not supported.

Please tell how how to achieve initValue() method.

Thanks and Regards

Rahul

I have the same question (0)
  • Verified answer
    Blue Wang Profile Picture
    on at

    Hi Rahul.p,

    If a method is explicitly marked as [Hookable(false)], the method can't be wrapped in an extension class.

    3527.PNG

    https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/extensibility/extensibility-attributes

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi,

    You can extend method initValue on PurchLineType class as all logic for PurchLine.initValue is stored there.

    BR, Sergey

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans