You need to sign in to do that
Don't have an account?
Kiran Kumar Gottula
attaching a file through developer console
Hi frndz !
How to upload a content document file in any object through only developer console.
Please help me that code.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi frndz !
How to upload a content document file in any object through only developer console.
Please help me that code.
What is the use case for uploading document files through the developer console?
Try the below code :-
Attachment attach =new Attachment(Name='newFile.csv'); //newFile is the name of the downloaded file and csv is its extention of file
attach.Body=Blob.valueOf(csvString); // csvString is the file in String format
attach.ParentId=myObj.id; // myObj.id is the ID of the Parent Object ()
insert attach; // insert 'attach' as we need to create a new object everytime.