You need to sign in to do that
Don't have an account?
venkatasubhashk
How to Get all opportunity Names in to a single field
I have written a SOQL Query to gell all Oppotunity names of some Criteria,I need to put all Opp names in a single Field of type text.Is there a Way to do it ,please Help!
You can simply concatenate all of the opportunity names that you have retrieved via SOQL, but I doubt you'll be able to fit all of this into a text field - a 32k long text area gives you a better chance, but you'll still fill that up if your volume of opportunity records is large.
Create an attachment out of the value i.e.
String oppNames = '';
for(Opportunity a :oppList){
oppNames += a.Name + '\n';
}
Attachment a = new Attachment();
a.Body = Blob.valueOf(oppNames);
a.contentType = 'text/plain';
a.parentId = <IDOFOBJECT>;
insert a;