cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Primary Name - what's that all about then?

Can I just clarify something, the Primary name feild that is created by the CDS. Whats that all about?

 

Is it like sharepoint Title where thou shalt never muck about with it for fear of the sharepoint gods smiteing you at a later date, or is it ok to edit it and shape it?

 

Whats the best practice and its intended purpose?

 

I found this on the matter and it says that i 'May' update or change the field on saving the data for the first time, but does i mean that at a later point its going to break something?

 

On the entity details page, click or tap the Primary Name field to open the Primary Name panel, and then in the Display name box, replace Primary Name with Product Review. In the Name box, replace PrimaryName with ProductReview, and then click or tap Done.

By default, every entity contains a Primary Name field, which is used by lookup fields when establishing relationships with other entities. Typically the Primary Name field stores the name or primary description of the data stored in the entity. You may update the name and display name of the Primary Name field before saving the entity for the first time.

1 ACCEPTED SOLUTION

Accepted Solutions
Kevin23
Level: Powered On

Re: Primary Name - what's that all about then?

The primary name field is similar to the Title field in SharePoint in that its the clickable link to open the record (if you are using it in a D365 app). In all other ways, it is not like the Title field. Feel free to change its name to whatever you want. It won't break anything and the CDS gods will not reign down on you for all time. Once you've set the name, you can't change it though, if you get it wrong, you will need to recreate the entity.

 

As for best practice, you should rename it to be representative of the data that you are storing in the field/entity. For example, if I had a Property entity, which was used to store the location details of properties in a portfolio, I would probably rename the Primary Field to Street Address, as its generally unique (but this is NOT a requirement of the Primary Field) and also a good way to identify the particular record in a list. 

View solution in original post

6 REPLIES 6
Kevin23
Level: Powered On

Re: Primary Name - what's that all about then?

The primary name field is similar to the Title field in SharePoint in that its the clickable link to open the record (if you are using it in a D365 app). In all other ways, it is not like the Title field. Feel free to change its name to whatever you want. It won't break anything and the CDS gods will not reign down on you for all time. Once you've set the name, you can't change it though, if you get it wrong, you will need to recreate the entity.

 

As for best practice, you should rename it to be representative of the data that you are storing in the field/entity. For example, if I had a Property entity, which was used to store the location details of properties in a portfolio, I would probably rename the Primary Field to Street Address, as its generally unique (but this is NOT a requirement of the Primary Field) and also a good way to identify the particular record in a list. 

View solution in original post

Re: Primary Name - what's that all about then?

Thanks for that, its those little things that may have an impact over time that need a little clarification. Great and detailed explination so thanks.

BrianSlalomMS
Level: Powered On

Re: Primary Name - what's that all about then?

It appears that I can't change the primary_name field to a whole number, which is what I really want (so it will sort correctly in lists, among other reasons). My natural key field is a number.

Given this, if I create a whole number field with my key value and I have no other natural key field which is text to put into the primary_name field, what should I put into this field? Its required to have a value.

Do you recommend duplicating my whole number key field value as text in the primary_name field, so it can be used for lookups?

 

 

Anonymous
Not applicable

Re: Primary Name - what's that all about then?

Posted under incorrect login!

Updated post coming.

Kevin23
Level: Powered On

Re: Primary Name - what's that all about then?

You are correct in saying you can't change to a whole number, it must be text. I wrote another post yesterday on what you can do with the name field. Maybe you can get some ideas from it.

https://powerusers.microsoft.com/t5/Common-Data-Service-for-Apps/How-to-autogenerate-Primary-Name-fi...

In addition to those options if you just wanted to fill the field with a value of another field, you could use a Business Rule to copy the value from another field, that would be the easiest option.

BrianSlalomMS
Level: Powered On

Re: Primary Name - what's that all about then?

Thanks. I am trying to create a business rule to convert my number to text.

What syntax is accepted in the Value field of a Set Field Value component?

I've tried Text(Value(cr89e_ionumbertext.Text)) and just cr89e_ionumbertext.Text but each of these are just taken as literal string values and the field is set to that string.

How do I specify that this is an expression which needs to be intepreted and executed?

 

Where is the syntax reference doc for putting expressions in the Value field?

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Users Online
Currently online: 132 members 5,334 guests
Please welcome our newest community members: