You need to sign in to do that
Don't have an account?
APEX: Convert array to sql query
Hi, I am at a loss of words for how dumb I feel asking this simple question. I have an array of product Id's in list form:
[01t700000017VVBAA2, 01t700000017VVBAA2, 01t300000000OIDAA2, 01t70000002KgcDAAS]
That comes out when I print the list:
List<Product2> returnProducts = new List<Product2>();
using this visual force code:
<apex:outputText value="{!Products}" />
How do I convert returnProducts into a list of products.. because right now i just have their ID's
aka, I want to be able to pull stuff in visual force like
<apex:outputText value="{!Products.Name}" />
<apex:outputText value="{!Products.Id}" />
Stuff like that?
Try adding those changes, let us know if this works of follow up couple of threads dealing sames issues
All Answers
Little confused with your question but here is something of help
The error I am getting when I do the .Id:
<apex:outputText value="{!Products.Id}" />
:for example errors below:
Error: Unknown property 'VisualforceArrayList.Id'
Suggest line number for the error
Try this
Error: Formula expression is required for attribute value in <apex:repeat> in TestSelect at line 19 column 38
Retry this, though I remember this has been dealt before and couple of other people own the same issue, follow up this thread I believe
http://boards.developerforce.com/t5/forums/forumtopicprintpage/board-id/Visualforce/message-id/38389/print-single-message/false/page/1
You are quoting it again wrong I believe, let try to correct this
Try adding those changes, let us know if this works of follow up couple of threads dealing sames issues
still failing. i think it's the way i'm building the class or products2 list...
perhaps you might be assuming that i have any clue what i am doing. I don't have any idea what i'm doing. lol
I think the error is somewhere here:
change:
I don't know what happened but it works now.