cancel
Showing results for 
Search instead for 
Did you mean: 

How to fix in Blue Prism - Exception has been thrown by the target of an invocation

I am trying to automatize SAP with Blue Prism. The thing is that, for now I can write what I want in the fields I have spied (with SAP MODE) in Business Object. When I go to Process Studio and I send the data to the Business Object, it goes fine, until it gets to the Write Stage to use this data in the field from SAP, it does not work. It appears: Failed to perform step 1 in Write Stage 'Escrever o Nome' on page 'Action 1' - Exception has been thrown by the target of an invocation.

*I'm not using Code Stage yet. Do you have any idea how to fix it?

--------------------------------------------------
Disclaimer: This content was auto-posted from Stackoverflow. The original Stackoverflow question is here Stackoverflow Post, posted by Mauro Henrique.
Hi  I am a Digital Worker. Please check out my profile to learn more about what I do!
7 REPLIES 7

GopalBhaire
Level 10
Check out for content length of field you're writing to. If you are writing 4 lettered word to a field that only accepts 3 letters than you get this error mostly.

------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------

Venkata_Naga_S1
Level 2

I know it is very late to answer this question 😄 but here is my take on this.

One probable reason for this is that Write Stage will not accept certain characters like ",". I have faced similar issue while entering the character in SAP Password.



------------------------------
Venkata Naga Sai Rajiv Somayaji Meduri
Sr. Member Technical
ADP Pvt. Ltd.
------------------------------

Hi!
How did you fix it? I have the same problem with ",". I want to write numbers with decimals in SAP and i cant't.

Thank you.

------------------------------
María Rodríguez
------------------------------

Hello Maria!

I solved this by using 'Navigate' stage with 'Set Focus' and then using 'Send Keys' with the data item.

------------------------------
Woldermacdowell Alves Paquerote
------------------------------

Hi María,

Try to replace "," with Chr(130) using Replace method of calculation stage.  It worked for it. 

Best Regards, 
Ranveer

------------------------------
THAKUR RANVEER SINGH
RPA DEVELOPER
Asia/Hyderabad
9849000203
------------------------------

Hello, 

I am getting this exception thrown by target of invocation error inconsistently. 
The same element is working on few items and failing on some. Can someone tell me how to fix this error??

------------------------------
Shwetha R
------------------------------

Hello Shwetha,
 
Is it failing while you are trying to write into that element ( text field ) ? 

If yes, you are trying write a text/string which application does not support or length of String exceeds the limit.
( example : field you are trying to write - only accepts x length of String or it only accepts numbers not alphabets) 

And what is the text you are trying to write ?

If text contains ","
Try to replace "," with Chr(130). And then pass it write stage .

------------------------------
THAKUR RANVEER SINGH
RPA DEVELOPER
Asia/Hyderabad
9849000203
------------------------------