How to Redirect To Standard New Attachment Pages Using Salesforce Apex?

Sample Code :

public PageReference redirectToNewAttachment() {

   PageReference pgRef = new pageReference('/p/attach/NoteAttach?pid=' + String.valueof(acc.Id).subString(0, 15) + '&retURL=' + acc.Id);

   pgRef.setRedirect(true);

   return pgRef;

}

0 Comments