salesforce - URLFOR misbehaving with Image attachment? -


trying simple getting strange results. have image stored attachment want display in vf page.

if works fine

 <apex:image  url="{!urlfor($action.attachment.download,'00pr0000008q3ymmak')}"/>  

however testing purposes hardcoded id. if try reference id in object fails. though value contained in object same above.

 <apex:image  url="{!urlfor($action.attachment.download,model.previewimageattachid)}"/>  

when load page error in urlfor param!!!

i thought problem because model.previewimageattachid string , not id created wrapper return id - same error. decided salesforce must have strange requirement can pass in real object did , passed in model.attach.id , still fails!!

please can explain me , more importantly suggest solution??!?

once again if output page

{!model.previewimageattachid} 00pr0000008q3ymmak 

so cant explain this!

thanks!

my bad...

was using apex:repeat , turns out of id values null. hence error


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -