function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
list<quoteDocument> lstQuoteDoc= new list<quoteDocument>();
List<Attachment> attlist =[select id,Body,Parent.Type,parentid from Attachment where id=:trigger.newMap.KeySet() and Parent.Type= 'Quote'];
for(Attachment att: attlist)
{
quoteDocument quoteDoc= new QuoteDocument();
quoteDoc.QuoteId=att.parentid;
quoteDoc.Document = att.Body;
lstQuoteDoc.add(quoteDoc);
}
insert lstQuoteDoc;
delete attlist ;
please follow the below code.. anyother better approach, pls share it..