cancel
Showing results for 
Search instead for 
Did you mean: 

Get Received Items (Basic) fails when an email recall is present

KalashSharma
Level 4
Hi All.

The Outlook Email VBO action 'Get Received Items (Basic)' fails when an email recall is present in the Outlook folder being read. Can we do any change in the standard code stage to avoid this from happening?

The error it fails with is:
ERROR: Internal : Could not execute code stage because exception thrown by code stage: Specified cast is not valid

------------------------------
Kalash Sharma
IA Consultant
Europe/London
------------------------------
2 REPLIES 2

ewilson
Staff
Staff
Hi @Kalash Sharma,

You can try adding a check of the message items MessageClass property to ensure it's not of type Recall. Take a look at the Code stage for the ​Internal_Get_Items action. The Code stage should look something like this:

17872.png
Insert a new row a line 58 with the following code:
If (item.MessageClass = "IPM.Outlook.Recall") Then Continue For​

The resulting code should look something like this:
17873.png
This should skip any recall messages encountered in the collection of the received items.

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hi @ewilson

Thanks for offering the solution in a well documented manner. It is working like a charm.

------------------------------
Kalash Sharma
IA Consultant
Europe/London
------------------------------