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

Link systemUser entity to my custom entity to have user datas (division, manager....)

Hello,

 

I need some help for this issue.

I have created an entity to let users share some activities.

I need to have the user manager, its division..reachable in my entity...

Then I wanted to create a relationship with these 2 entities (like it exists by default).

But, when I create the relationship, the name of the field (for exemple businessunit in the systemuser entity) can never be entered because it is always prefixed like a field in my entity (eg : cc3_34).

 

Do you have an idea how I can do this ?

Thanks a lot,

 

 

10 REPLIES 10
Super User II
Super User II

Hi,

Can you share some screenshots of what you are trying to do? It is hard to understand from what you are describing.
Super User
Super User

Hi @Emmanuel33333 

Just create a new field on your entity and choose type Lookup. Then select the entity where your manager information is stored. CDS will handle creating the relationship for you.

 

---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

Community Support
Community Support

Hi @Emmanuel33333 ,

Which relationship do you created between your two Entities? One-to-Many (Many-to-one)? Many-to-Many?

 

Actually, it is a normal behavior in CDS Entity -- When you create a relationship between two different Entities, the relationship name would be generated with a default prefix (generated by system).

Currently, within PowerApps, there is no way to modify the prefix value of the relationship field (or LookUp field).

14.JPG

Note: The Prefix value is generate by CDS system, which could not be modified.

 

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello and thanks for your time.

 

Actually, I think that what I want to do is really simple et I'm just a beginner.

 

I have a custom entity, wich has relationship with the user entity (utilisateur in my system), for exemple to know who has created a record.

I want to have more information on the user : its Division, its manager.

 

The 1st screen : this is the relationship, created by the system by default (it works fine).

 

 

RelationshipSystem.PNG

The 2nd screen is when I want to create another relationship to have others fields in the entity User (it doesn't work)

 

relationshipCustom.PNG

 

The name of the field in the user entity is "businessunitid".

 

When I create a new record in my entity, the name of the user is shown, but the businessuitid is empty...

 

Then, the next step would be to search in the Division entity to have the name of the entity.

 

Thanks for your time,

 

 

 

 

Sorry guys, the relationship works well.

My problems is that I can't access to the associated fields in a form.

In the folowing screenshot, I can add some associate field in a view, but this doesn't exist when I create a form...

 

AssociateFields.PNG

 

Thanks, 

Hi @Emmanuel33333 ,

 

Thanks for sharing the screenshots and some more info.  Really helps.

 

Firstly, I would not recommend creating a custom look-up field to Business Unit.  Business Units are used as part of the security model for CDS and should be considered carefully when making customisations around them.

 

However, what I think you are really looking for is a Quick View form that displays on your entity form the Business Unit (Division) and Manager for the Created By user.  Take a look at this article on Quick View forms.  I hope that helps

Also, @Emmanuel33333 

 

If you can't find a field to add to the form then it may be hidden by the Par defaut filter next to the search box ( see your screenshot below).  If you change Par defaut to your equivalent of English "All" then you will see more fields like the Created By field.


AssociateFields.PNG

Thanks all for you time, and sorry for my bad english.

 

My goal is just to use the hierarchy to add some business rules after.

 

I have created the hierarchy ( user, team, division, director/manager....) and it looks good.

But my problem is just how to access these datas from my entity, that's why I wanted for every record to access who has created it (it's good now) but I need the user division, user manager... and this is what I don't achieve.

 

I keep on searching, reading. testing...!

Thanks again,

 

This might be what you are looking for. 
On your form for the custom entity add a new section, then in that section add a quick view component - you should get a drop down to pick the user table, then those fields will show up in your form. If the fields you want aren't all there, then go back to the system user table and either modify or create a new quick view.
userquickview.PNGuserscreen.PNGuserscreen2.PNG

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Users online (11,418)