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

how can i add field into a system(existing) report.?

(0) ShareShare
ReportReport
Posted on by 226

how can i add orderAccunt from purchTable into an existing report "purchPackingSlip".

i have created extension of table and copied report into new project and added two classes "controller" and "Event Handler " .

 ""TmpTable.VendAccount = purchTable::find(TmpTable.PurchId).InvoiceAccount;"" entered this codee into "EventHandler Class".

but not getting value . 

how can i do it correctly?

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at

    Hi jd junaid,

    Please refer to the steps described in the blog to add new field to standard report.

    dynamicsfox.com/.../

  • Verified answer
    Martin Dráb Profile Picture
    238,743 Most Valuable Professional on at

    The field value can be obtained in an easier way:

    [ExtensionOf(classStr(PurchPackingSlipDP))]
    internal class Xyz_PurchPackingSlipDP_Extension
    {
    	protected PurchPackingSlipHeaderTmp initializeProductReceiptHeader()
    	{
    		PurchPackingSlipHeaderTmp headerTmp = next initializeProductReceiptHeader();
    		headerTmp.XyzVendAccount = this.parmVendPackingSlipJour().OrderAccount;
    		return headerTmp;
    	}
    }

  • JJDunaid Profile Picture
    226 on at

    hi Martin,

    i have tried your code but I still can't get vendaccount.

  • Martin Dráb Profile Picture
    238,743 Most Valuable Professional on at

    I'm sorry, but I can't help you until you describe your problem properly.

    Please use the debugger to find out whether this piece of code works. If it does, your problem lies somewhere else, such as that you didn't add the field to your report or didn't configure print management to use your report instead of the standard one.

  • JJDunaid Profile Picture
    226 on at

    i have been customizing my report in original view and have to add vendaccount field from purchtabel .

    but what ever i try it never gets data from purchtable form  .

  • Martin Dráb Profile Picture
    238,743 Most Valuable Professional on at

    Please try the code I gave you, debug it and inform us about the result.

    As you see, you have no idea what failed if you try to test all changes at once.

  • JJDunaid Profile Picture
    226 on at

    this helped me martin,.

    now what i have to do if i have to take "Requester" from "PurchTable"form

    "requester " is in PurchOrderLine.

    can you help.?

  • Verified answer
    Martin Dráb Profile Picture
    238,743 Most Valuable Professional on at

    First of all, look at the class you want to extend, i.e. PurchPackingSlipDP. Find the logic you're interested in. You'll find that the table buffer for lines is purchPackingSlipTmp and its fields are populated in initializeProductReceiptLine(), therefore that's the method you need to extend.

    Then look at how the fields are populated. You should soon realize that this report is based on purchase order data - it's based on packing slip journal.

    For example, this is how quantity is copied from the journal line:

    purchPackingSlipTmp.Qty = _receiptLineSelection.parmVendPackingSlipTrans().Qty;

    You need to decide whether you want to add Requester to VendPackingSlipTrans, or you'll try to fetch PurchLine from VendPackingSlipTrans and take the requester from there.

    Assuming your want the latter, you just need to call purchLine() method of VendPackingSlipTrans and then access the field. For example:

    purchPackingSlipTmp.XyzRequester = _receiptLineSelection.parmVendPackingSlipTrans().purchLine().Requester;

  • JJDunaid Profile Picture
    226 on at

    i am gettig error wether i put my code in separate dp extension classs or in previous dp extension  class.

    pastedimage1674104019777v1.png

  • JJDunaid Profile Picture
    226 on at

    one error is resolved as i have not returned the value

    but the error is "Chain Of command method must contain one next call".

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 366

#3
Adis Profile Picture

Adis 256 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans