Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Get all responsible person informations

Posted on by 85

I'm working on the sales invoice report and one of my tasks is to display the name and the phone no. of the responsible person in the header. If I use the data source "Sales Invoice Header"."Responsible Person" the code will be displayed (for e.g. AB for Antonio Bryant). Can someone explain to me how I can get the same informations for the resp. person like the informations for the "SalesPurchPerson"?

*This post is locked for comments

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Get all responsible person informations

    You need retrieve the table holding the  Responsible Person Informatoin and Use that as the source expression. Check the code how to retrieve the Responsible Person just like SalesPerson, Payment Terms, Shipment Method.

  • Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: Get all responsible person informations

    Create a global variable on the record "Salesperson/Purchaser".

    Add the desired fields of that table to the dataset of the report. You can select the new global variable as DataSource.

    In the OnAfterGetRecord-trigger of the "Sales Invoice Header"-datasource add the following:

    IF NOT SalesPurchPerson.GET("Sales Invoice Header"."Responsible Person") THEN
      CLEAR(SalesPurchPerson);


    Add the new fields to the report layout.

  • Yupp90 Profile Picture
    Yupp90 85 on at
    RE: Get all responsible person informations

    It's Salesperson/Purchaser

  • Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: Get all responsible person informations

    What is the TableRelation of the field "Responsible Person"?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans