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....
So my question is: How can I get the blob value from the Tenant Media Set if there is no corresponding Tenant Media?
Don't just take my word for it, test it yourself
0
Answers
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.