quinta-feira, 28 de setembro de 2017

Salesforce - Delete list of Attachment



Developer Console >> Debug >> Open execute Anonymous Window


List<Attachment> ListAttachments =
    [SELECT id from Attachment];

System.debug(
    ListAttachments.size()
);

delete ListAttachments;





Deleting Cases and Contacts


List<Case> ListCases =
    [SELECT id from Case];

System.debug(
    ListCases.size()
);

delete ListCases;


List<Contact> ListContacts =
    [SELECT id from Contact];

System.debug(
    ListContacts.size()
);

delete ListContacts;

Nenhum comentário:

Postar um comentário