I have followed each and every word said in the video, with care. Yet there are a couple of errors that I get when I compile the process:
Error ERROR Validation Error BC30456: ‘Headers’ is not a member of ‘List(Of MailMessage)’. Main.xaml
Error ERROR Validation Error BC30456: ‘Body’ is not a member of ‘List(Of MailMessage)’. Main.xaml
Error ERROR Validation Error BC30311: Value of type ‘String’ cannot be converted to ‘MailMessage’. The selected value is incompatible with the property type. Main.xaml
Error ERROR Validation Error BC36754: ‘List(Of MailMessage)’ cannot be converted to ‘IEnumerable(Of String)’ because ‘MailMessage’ is not derived from ‘String’, as required for the ‘Out’ generic parameter ‘T’ in ‘Interface IEnumerable(Of Out T)’. The selected value is incompatible with the property type. Main.xaml
I am using the 2025.0.161 Community license Studio.
Consulted online resources for debugging the error as it seems obvious. But I have declared those variables and can’t figure out where the issue is…
Headers or Body are properties of a mailmessage object.
So myMailmessage.body is valid.
However List(of Mailmessage) is not a mailmessage, but a collection of objects. The .body reference then applies to the list object, and not to the mailmessage.
In order to target a specific mail message you can use myList(0).body, where (0) refers to the 1st mailmessage in the collection. Alternatively to calling memners individually you can loop through them using ‘for each’ constructs.
Handling collections are fundamentals of programming. Reading up on these subjects can prevent confusions next time.
I understand I need to know programming and I have taken basic courses during my Bachelor’s degree, such as Matlab and C. But I don’t see I have learnt what UiPath mentions because it either uses C# or VB. Can you recommend something where I can learn at least the concepts related to expressions used in activities of UiPath?