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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Can FreeTextInvoice have multiple extensions

(0) ShareShare
ReportReport
Posted on by

Hi All,

Can we have multiple extensions for FreeTextInvoice report DP classes. We have some new customisation , but there is already a extension class for adding a new field.

We have to check the existing field value , if it is empty them need to populate value from one place.

Please advice us.

Regards,

Akbar

I have the same question (0)
  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,429 on at

    Hi Akbar,

    You can add multiple extensions. But if you already have an extension class created, it is better you keep all your changes in the same class only. Is there any particular reason you are looking to create another extension?

  • Akbarpasha Profile Picture
    on at

    Thank you Gunjan for quick response.

    In the existing extension class, 2 field values for temp tables has assigned.

    But for new change, there is a FreeTextInvoice Id field is containing 2 types of IDs, for one type the description is populating as expected in report, but another type the description is missing, we need check and assign the description value.

    Regards,

    Akbar

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,429 on at

    Hi Akbar,

    You can use the same extension class for this change as well. It will be easier to locate the changes for other developers too, since all the changes related to free text invoice DP will be in a single extension class. You could add a comment for the new logic that you are going to write for the new Description field.

  • Akbarpasha Profile Picture
    on at

    Thanks Gunjan for the inputs.

    We are trying to populate one field into temp table, is populating only for one type of invoices in free text invoice form ex: FI***, 

    It is not populating for the another type of invoices ilke FT***,

    Even we tried to give the hard coded manual value from DP extension class , still this value also populating for FI*** not for FT***.

    Please advice how we can proceed.

    Regards,

    Akbar

  • Gunjan Bhattachayya Profile Picture
    35,429 on at

    Hi Akbar,

    Have you tried to debug to check why it is working for one free text invoice and not the other other one? Might be that your extended method is not getting called for the free text invoice - FT**.

    Please share your code here. Maybe we can understand what might be going wrong for you.

  • Akbarpasha Profile Picture
    on at

    Hi Gunjan,

    In the existing extension class , below methods called:


    [ExtensionOf(classStr(FreeTextInvoiceDP))]
    final class ****FreeTextInvoiceDP_Extension
    {
    protected void populateFreeTextInvoiceTmp(
    CustInvoiceJour _custInvoiceJour,
    CustInvoiceTrans _custInvoiceTrans,
    TaxSpec _taxSpec,
    CustPaymSchedLine _custPaymSchedLine,
    CustTrans _prepaymentCustTrans,
    TaxTrans _prepaymentTaxTrans)
    {
    next populateFreeTextInvoiceTmp(
    _custInvoiceJour,
    _custInvoiceTrans,
    _taxSpec,
    _custPaymSchedLine,
    _prepaymentCustTrans,
    _prepaymentTaxTrans);

    freeTextInvoiceTmp.TaxCode = _custInvoiceTrans.TaxItemGroup;

    freeTextInvoiceTmp.Name = "Invoice text"; ==> This we have hard coded here which is working only for FI*** not for FT***


    }

    }

  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,429 on at

    Hi Akbar,

    This should work for you, unless this field is being updated anywhere else in case of FT*** invoices. You could try this. Go to FreeTextInvoiceTmp table, highlight the field "Name". Right click and find references. I can only see the reference in FreeTextInvoiceDP\populateFreeTextInvoiceTmp method in the standard environment.

    Another approach could be to create a new field in FreeTextInvoiceTmp extension and assign values to this field. You can then use this field in the free text invoice report design instead of the standard field.

  • Akbarpasha Profile Picture
    on at

    Hi Gunjan,

    Application is behaving strange:

    Checked 1 option by right click and find references, found only 2 places , one is in standard DP class and second one is in extension class(hard coded one).

    When we removed hard coded line , it is showing only in Standard DP class:

    pastedimage1646227429925v1.png

    Tried with option 2: adding a new field - added a new field, hard coded the value and replaced in report design, deployed the report, performed Build, now for both the invoices FI*** and FT***  it is coming blank. Not sure where is the problem for the new field.

    Regards,

    Akbar

  • Gunjan Bhattachayya Profile Picture
    35,429 on at

    Hi Akbar,

    Did you debug to check if this method - populateFreeTextInvoiceTmp is being executed? While updating the field Name, when you set the value to static text, was Name displaying the static text for FI** invoices?

  • Akbarpasha Profile Picture
    on at

    Hi Gunjan,

    Yes, the method is getting executed but I cannot see the values passing into the tmp table as it is showing the below info:

    "The name FreeTextInvoiceTmp does not exists in the current context."

    do we need to write tmp.insert() after static line?

    pastedimage1646228846874v1.png

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 681 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 551 Super User 2026 Season 1

#3
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 471

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans