You need to sign in to do that
Don't have an account?
Priya Aakanksha
how to do two action with one button one should send mail and another get attached in note and attachements
how to do two action with one button one should send mail and another get attached in note and attachements
===============
// this code is attachment of pdf=====
public void saveAttachment(){
String encodedContentsString = System.currentPageReference().getParameters().get('fileContents');
Id accountId = System.currentPageReference().getParameters().get('accountId');
Attachment attachment = new Attachment();
attachment.Body = Blob.valueOf(encodedContentsString);
attachment.Name = String.valueOf('test.txt');
attachment.ParentId = accountId;
insert attachment;
}
==========================//
All Answers
Call One method from another method within the class, or you could use javascript and use the oncomplete function (maybe).
Thank You
www.nubeselite.com
Developement | Training | Consulting
Please Mark this assolution if your problem resolved.
=======================================
public pagereference sendmailandsavepdf(){
for(mywrapperclass w:wraplist){
if(w.flag == true){
if(w.dmrec.DeNoSent__c__c == false){
w.dmrec.DeNoSent__c=true;
w.dmrec.DeNoSent__c=system.today();
update w.dmrec;
}
}
}
==========
plz reply
Controller:- Page:-
Thank You
www.nubeselite.com
Developement | Training | Consulting
Please Mark this assolution if your problem resolved.
===============
// this code is attachment of pdf=====
public void saveAttachment(){
String encodedContentsString = System.currentPageReference().getParameters().get('fileContents');
Id accountId = System.currentPageReference().getParameters().get('accountId');
Attachment attachment = new Attachment();
attachment.Body = Blob.valueOf(encodedContentsString);
attachment.Name = String.valueOf('test.txt');
attachment.ParentId = accountId;
insert attachment;
}
==========================//