SendEmail icon indicating copy to clipboard operation
SendEmail copied to clipboard

Executable/sources/documentation not in sync?

Open marcbourlon opened this issue 5 years ago • 2 comments

Hi Dan, thanks for this (theoretically) great plugin. I can't wait to get it to work. So far, though, I'm facing the fact that the documentation is scarce, to say the least, and apparently not in sync with the executable. Example: 3 ways of doing attachments, all apparently lists, but showing as Text variables in the Flow: two accept a text variable, one does not. All of this being undocumented. The source on Github does not even reflect these fields. HELP! P.S.: Happy New Year!

marcbourlon avatar Jan 02 '20 11:01 marcbourlon

We will sort this out soon as we have added the case threading feature too.

mike-cleaver avatar Dec 21 '22 22:12 mike-cleaver

@marcbourlon ok, so the documentation refers to #4 Attachments ‘Attachment – ContentDocument – Comma Separated Ids’ — This is the ContentDocumentId of the document you want to attach. It will take the latest ContentVerion. ‘Attachment – ContentVersion – Comma Seperated Ids’ to specify a specific ContentVersionId ‘Attachment – Comma Separated Ids’ – List of Attachment Ids the first two expect a single string, which contains the IDs in a csv format ('0XXXXXXX,OXXXXXXY,OXXXXXZ') The latter expects a collection variable of type ID. All of these now behave the same way, regardless of what IDs you pass, and in which variable, the code checks each type and compiles them correctly. The two strings can be a mix of attachment, contentDocument and ContentVersion IDs (for example '0690o00000Bhdg8AAB,0680o00000EHn3DAAT,00P0o000020YRukEAG') The list of IDs can also be a mix image

So one of the strings is now redundant but for backwards compatibility (and because salesforce says so) we can't remove it,

As for the code you will see in the sendEmail class, the variables are

			label='Attachment - ContentDocument - Comma Seperated Ids'
			description='List of Content Document Ids'
			required=false
		)
		global String ContentDocumentId;

		@InvocableVariable(
			label='Attachment - ContentVersion - Comma Seperated Ids'
			description='List of Content Version Ids'
			required=false
		)
		global String ContentVersionId;

		@InvocableVariable(
			label='Attachment - String Collection of Ids'
			description='List of Attachment Ids'
			required=false
		)
		global List<Id> AttachmentIds;```
		
		I hope this answers your questions?

mike-cleaver avatar Dec 22 '22 23:12 mike-cleaver