Where does my Item.Picture hide?

Sunset
Member Posts: 201
In a BC13 (Build 28871) I have a report written in al/rdlc where I want to include the item picture that is displayed in the item page.
- First I just just included the Item.Picture in the dataitem column, but for some reason not all the pictures where included.
- Then I changed the code to repeat through Tenant Media using the Item.Picture.Item(index:Integer) method. This got most of the pictures.
- Now I have an example of a picture being displayed on the Itempage that is not present in the Tenant Media record; but I have tracked it to the Tenant Media Set record....
Don't just take my word for it, test it yourself
0
Best Answer
-
OK, so I was going about it in the wrong way.
I was using the GUID from the Picture field to TenantMedia.GET() which coincidently will work in 80-90% of the time.
However the correct way of doing it is to use the Item.Picture.MediaId to filter the TenantMediaSet.Id, and from there do a loop to try to TenantMedia.GET(TenantMediaSet."Media Id".MediaId)
Or at least so far that seems to be doing the trick for me.Don't just take my word for it, test it yourself0
Answers
-
OK, so I was going about it in the wrong way.
I was using the GUID from the Picture field to TenantMedia.GET() which coincidently will work in 80-90% of the time.
However the correct way of doing it is to use the Item.Picture.MediaId to filter the TenantMediaSet.Id, and from there do a loop to try to TenantMedia.GET(TenantMediaSet."Media Id".MediaId)
Or at least so far that seems to be doing the trick for me.Don't just take my word for it, test it yourself0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions