Invoking Workflow file immediately crashes with 2 error messages related to different types of strings (Literal<string> and VisualBasicValue<string>)

The invoked workflow file uses the UiPath.Salesforce.Activities package (1.9.3 currently but the same issue was returned in v1.8.0) to create a link using the ‘Insert Record’ as well as the ‘Update Record’ activity to upload attachments.

Any idea what the fatal error may be related to? I’ve checked and all values being passed and retrieved are basic string values. Please see the below screenshot for the exact error messages being returned.

I’m using Studio 2024.10 LTS versioning.

Error indicates the issue is with your ‘Insert Record’ activity, can you show us that?

Please see below.

Ok nice.

What happens if you take that activity, put it in its own workflow and only put hard coded variables in it, no variables?
Can it run and insert the record?

Took a while to test, but it was able to insert a record no problem.

Any idea why that is?

Not yet, but hopefully we can narrow some things down.

In the isolated workflow, does it work if you pass the variables etc that you currently have?

That has also worked. We’re able to create a record with the testing xaml.

I’m wondering if the issue is to due a variable in the original call causing an issue.

I think I’ve figured out what is at fault.

The above logic is used across 2 processes, with the logic corrupting this solution but not the other. I’ve noticed that only one process uploads an attachment through the API, converting the file into Base64 to be accepted by the Salesforce Connector Activity.

I’ll be reviewing other options to attaching a file to meet the asks of the client.

Thank you for helping me to discover @Jon_Smith !

image

Ok nice!

Breaking it apart step by step usual highlights something like this, which was my intent, glad it got you working along the right path!!

Hi @Rashid.RPA

You can try to use arguments instead of some shared activities as well check the scope too

Try this hope it works

I’ve come back to say that the above issue has been resolved.

The original xaml made 3 API calls to our custom Salesforce server. The fix was to split the API calls into their own xamls.

I believe the primary issue may have been that some insert/update record activities weren’t contained within their own Salesforce Application Scope activity.

Thank you for helping me discover the fault @Jon_Smith!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.