Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @isTest Static Void createAttachwithFiles(){
- //Create Task.
- Task t = new Task();
- T.subject = 'Creating Attachments';
- T.Description = 'The Good, The Bad & The Ugly';
- t.Priority = 'High';
- insert t;
- Attachment att = new Attachment();
- att.ParentId = t.Id;
- Blob bodyBlob = Blob.valueOf('Unit Test Attachment Body');
- att.body = bodyBlob;
- att.Name = 'attachHarry';
- Insert att;
- }
Add Comment
Please, Sign In to add comment