top of page

Update a Dataverse record and link to a related table by using the plural table name

Writer's picture: Jon RussellJon Russell

Updated: Nov 30, 2022

Hello. How are you doing?


I wanted to write this post mainly because I often need to do it and I always head off to the internet to find out the answer. So why not put it on your own blog and then you never need to search for it again.


TL;DR


The easiest way to the get the plural name of a table is to do the following:




This copies the entity set name to the clipboard. Special thanks to Lloyd Broley for pointing that out

Introduction


My wife works at a nursery and I wanted to build a Model-Driven app based on Dataverse data. The premise is that a parent can fill in a form which writes data to a ’Child’ table in Dataverse. A Power Automate cloud flow will run to check to see if the email provided by the parent exists. If it doesn’t a record in the ‘Parent’ table will get created and if it doesn’t then one gets created, after that the ‘Child’ record then gets updated and linked to the ‘Parent’ record

Note: I am talking about tables called Parent and Child here.

The related records are known as polymorphic records. I still haven’t got a clue what that means. But you know SEO and all that ;)


Let’s crack on.


Let's look at the Parent table. In the screenshot below, I have clicked on the properties cog to check out what the logical name of the table is:




This logical name is important. We need this to find the plural name of this table also known as the entity set name.

In my case this logical name is jdf_parent.


I then need to head over to my Power Platform admin Centre and look at the environment URL` that I am working in.



We need to take a copy of the environment URL. We need this as a component part of this URL:



This is then going to help us formulate the rest of the URL that we need to make a call to the API to get back the plural name of the table that we can use to link the Parent record to the Child record (yes, I know, these table names are a bit confusing, but they are part of the Nursery solution)


The URL we need in my case looks like this:



This is made up of:




If I now paste this into my web browser URL bar, I get this back:




In text form, this is what that looks like (as I realise you are going to need a jeweler's eye piece to be able to see that screenshot):


{"@odata.context":"https://org48ab23b4.crm11.dynamics.com/api/data/v9.1/$metadata#EntityDefinitions(EntitySetName)/$entity","EntitySetName":"jdf_parents","MetadataId":"6e1eff4a-21b3-eb11-8236-000d3a7fbe09"}

The key part here is the bit in speech marks after the EntitySetName - jdf_parents. It sounds obvious that this is the plural name of jdf_parent but it is always worth checking this way.


Why do you ask?


Well, sometimes people repurpose tables and change their name to something else. I.e. Opportunity to Application or something like that. If that is the case, this is the sure-fire way to get the right plural or entity set name.


If you are building Dataverse tables, I would strongly advise calling the table by its singular name, otherwise you can get into issues trying to work out what the plural name is.


Once you have this, you can now go back to your Power Automate cloud flow.


On the step where you are creating a new, in our case, Parent record and then linking that back to the Child table by using the Dataverse action "Update a row", the syntax to link this record to the parent record is:


/jdf_parents(GUID)


As shown in the screenshot below:



I hope this helps, it is definitely going to help me stop from searching for these steps every time haha.


As always, any questions please drop a comment on this post.



2,666 views4 comments

4 Comments


Tuco Salamanca
Tuco Salamanca
9 hours ago

The Phantom Chrome Extension boosts online privacy by blocking trackers, ads, and preventing data collection. It ensures a safer, faster, and more private browsing experience by masking your digital footprint while maintaining ease of use. Phantom chrome | Phantom chrome extension

Like

Tuco Salamanca
Tuco Salamanca
2 days ago

The Phantom Chrome Extension boosts online privacy by blocking trackers, ads, and preventing data collection. It ensures a safer, faster, and more private browsing experience by masking your digital footprint while maintaining ease of use. Phantom chrome extension | Phantom chrome

Like

Danniel Georgia
Danniel Georgia
Nov 30, 2024

When updating a Dataverse record and linking it to a related table using the plural table name, it's important to follow best practices to ensure accurate data management. The plural table name is typically used to maintain consistency in relationships between tables, especially when linking records in one-to-many or many-to-many scenarios. When performing this update, make sure to reference the plural form of the related table correctly in your queries or data manipulation operations.

Additionally, while working with data, it’s essential to ensure that your descriptions and explanations are clear and grammatically correct. Using a grammar checker can help you identify any inconsistencies in your written content, ensuring that your documentation and communication about updates are professional and easy to understand.…

Like

diver kel
diver kel
Nov 22, 2024

Uniswap is a decentralized exchange (DEX) protocol on the Ethereum blockchain that enables users to trade ERC-20 tokens directly without intermediaries.Uniswap Login It uses an automated market maker (AMM) model, where liquidity providers (LPs) supply funads to liquidity pools, earning fees from trades. Uniswap ExchangeUniswap's algorithm sets token prices based on the ratio of assets in each pool, ensuring liquidity at all times. The protocol is governed by its community through the UNI token, allowing holders to vote on key decisions.Uniswap Wallet Uniswap’s decentralized nature reduces reliance on centralized exchanges, offering enhanced security and privacy for users.RaydiumRaydium is a decentralized exchange (DEX) built on the Solana blockchain, providing fast and low-cost swaps for users. Raydium SwapUsing its automated market maker (AMM) protocol, Raydium…

Like

Subscribe Form

©2019 by Jon Does Flow. Proudly created with Wix.com

bottom of page