cancel
Showing results for 
Search instead for 
Did you mean: 

Dataverse - Update, Select and Insert

AnkitaKarnany
Level 4
Hi All,

Has anyone tried the Microsoft Dataverse vbo? DX Asset
Please can any one give me a resolution or an idea how to use this  to extract, update and insert values to the Dataverse 

------------------------------
Ankita Karnany
Principal Consultant
Agilisys
London
------------------------------
19 REPLIES 19

ewilson
Staff
Staff
@AnkitaKarnany,

You'll want to familiarize yourself with Microsoft's Dataverse Web API documentation. I would suggest looking over the Samples and Web API Reference sections. These provide lots of information about working with Dataverse which you can subsequently leverage as you work with the BP connector for Dataverse.

As an example, let's say I want to create a new account entry in Dataverse. I might take a look at this sample from the Microsoft documentation​ and see that it basically maps to the Create a record action of the BP connector. All I need to do is pass in accounts as the name of the Dataverse table (aka Entity) and a JSON blob containing the account details (a simple example is included in the Microsoft sample referenced above). Here's a sample account payload:

{
    "name": "Sample Account",
    "creditonhold": false,
    "address1_latitude": 47.639583,
    "description": "This is the description of the sample account",
    "revenue": 5000000,
    "accountcategorycode": 1
}​


FYI - The filter parameter is only actually used with the Retrieve a particular record and Retrieve multiple records actions.

Cheers,

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

Hi Eric

I am trying to use the action 'Retrieve a particular record'.

I am passing the following in:

table name : scheme
URL: https://testrpadev.crm11.dynamics.com/
key : 10eb5d21-2ca6-4b75-baad-86f385c4f932

no filter is required and the access token is valid.

When running the action, it says 'Unexpected error'. No HTTP Status is returned so I assume, no request is sent outbound.

What am I doing wrong?

------------------------------
Jonathan Pringle
RPA Developer
Agilisys
Europe/London
------------------------------

Hello @Jonathan Pringle,

Based on what I see in the Web API definition you should try your URL without the trailing "/". Pass it in as https://testrpadev.crm11.dynamics.com.​ Following is a screenshot of the Base URL setting in the Web API. You can see that it takes what you pass in as the Dynamics365URL value and appends /api/data/v9.2 to it. So, if you include a trailing "/" you'll end up with an invalid URL.

6270.png
Cheers,

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

Hi @ewilson

I removed the trailing slash but unfortunately, the same error.

the BP wrapper should build the URL into this:
https://testrpadev.crm11.dynamics.com/api/data/v9.2/scheme(10eb5d21-2ca6-4b75-baad-86f385c4f932)

I have even added a filter but that didnt work either.
https://testrpadev.crm11.dynamics.com/api/data/v9.2/scheme(10eb5d21-2ca6-4b75-baad-86f385c4f932)$select

This has got me stumped. 😞


------------------------------
Jonathan Pringle
RPA Developer
Agilisys
Europe/London
------------------------------

Hi,

you probably need to identify if it is Blue Prism or the API that is causing your issue.  Try running the API call using CURL command or Postmsn, outside of blue prism to test this. 


I needed this API a while back before it was released so ended up making my own with Cosmos DB. You might get some tips from my asset here - https://digitalexchange.blueprism.com/dx/entry/8797/solution/cosmos-db-table-rest-api.

Good luck,
Peter Lacken 



------------------------------
PeterLacken
Ren Røros Intelligent Automation
Peter.Lacken@rria.no
http://www.rria.no
------------------------------

@Jonathan Pringle,

Couple questions:

  1. Are you able to successfully get an authentication token?
  2. Have you tried capturing the network traffic using something like Fiddler?

Cheers,


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

Hi Eric
Thanks for your reply. 

Yes, I successfully got an authentication token, so in that sense Blue Prism is working successfully there.

Its the Data retrieval that's proving to be awkward.

------------------------------
Jonathan Pringle
RPA Developer
Agilisys
Europe/London
------------------------------

@Jonathan Pringle,

Going back over the Web API definition and I think I know what might be the issue. Even though you're getting a token back from the authentication VBO and passing that in to the Web API it seems the Web API isn't actually doing anything with it. 🤦‍♂️

Here's a test you can run.
  1. Open the Web API definition in Blue Prism (System -> Objects -> Web API Services -> Microsoft Dataverse)
  2. Verify there's a data item defined in Common Parameters titled access_token.
  3. Go to Common Headers and create a new header as depicted below:
6305.png
Click OK to save the change and run your test again.

​Cheers,

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

Hi Eric,

As suggested by you, I ensured  there's a data item defined in Common Parameters titled access_token. Please refer the screenshot below

6309.png

Also, I have created a new header under common header's

6310.png
Not sure if I am missing something, basic ?


------------------------------
Ankita Karnany
Principal Consultant
Agilisys
London
------------------------------