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

Using Ship To User-Defined 2 on SOP documents

(0) ShareShare
ReportReport
Posted on by 75,854 Moderator

I am using RM00102.USERDEF2 to hold a value that needs to print on SOP documents. This value is used for the Ship To Address code. On the packing slip form the Customer Master Address File is linked but it is using the ADRSCODE field which unfortunately defaults to the billing address. I have tried to switch it to the primary shipping code but that field is not even listed as an option. Is there any way to get the packing slip to use the ship to address record as opposed to the bill to address record?

Categories:
  • Joseph Markovich Profile Picture
    4,007 on at

    Richard, I haven't used Report Writer in so long -- can you add the Customer Master Address in Tables a second time and join it to Primary Ship To Address Code in Sales Transaction Work?

    The other option that pops into my head is using VBA and a SQL query to get the value to a calculated field. Yes, I know, VBA is deprecated, but it would still work.

    Joe

  • Richard Wheeler Profile Picture
    75,854 Moderator on at

    I tried adding the Customer Master Address  table a second time but it does not appear on the list in R/W even after choosing the primary ship to address code. I think we will convert our forms using GP Reports Viewer from Flex-Solutions.

  • Verified answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,157 Most Valuable Professional on at

    Hi Richard

    You cannot add a table to the report writer twice and it can only use the defined relationships on the tables.

    But there is an easy solution for you using the RW_RMAddrIDInfo() RW Function I added into the core code back in 2002 and updated to include the UDF1 and UDF2 fields in 2014.

    Just create a calculated field using the user defined function in the system series and pass in the Customer Number, Address Code and a integer constant value of 15.

    in 'Customer Number' IN_Customer_Number;

    in 'Address Code' IN_Address_Code; { Leave Blank for Default }

    in integer IN_Field;

    {

    IN_Field should use the following values:-

    1 = Contact Name

    2 = Address 1

    3 = Address 2

    4 = Address 3

    5 = City

    6 = State

    7 = Zip

    8 = Country

    9 = Phone 1

    10 = Phone 2

    11 = Phone 3

    12 = Fax

    13 = Country Code

    14 = User Defined 1

    15 = User Defined 2

    }

  • Suggested answer
    Richard Wheeler Profile Picture
    75,854 Moderator on at

    This works like a charm. Thank you very much.

  • Joseph Markovich Profile Picture
    4,007 on at

    Hi Richard-

    If you were going to go down the route of using SSRS, I have a TON of SQL views and SSRS templates I've used and am happy to share them with you. My ISV solution of choice for this has been Dynamics Report Manager from Rockton Software.

    Joe

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 555 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 484 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 378

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans