web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Virtual entity - account lookup relation

(1) ShareShare
ReportReport
Posted on by 15

Hi all.

I have a question related to virtual entities.

I defined virtual entity "Transaction", which includes data of account transcations from external system.

Every transaction is realted to one account. Virtual entity Transaction includes externalaccountid (string) field, which is also included on account entity. 

How can I create relation between virtual entity Transaction and (real) entity account?

Can i create lookup field on virtual entity to account?

I already saw some samples of making relations between virtual entities. There is no sample of making relation from virtual entity to real entity?

Thanks in Advance...

*This post is locked for comments

I have the same question (0)
  • Rizwan Aarif Profile Picture
    480 on at

    Hi Peter,

    You can refer to the below link describing how to relate virtual entities. I too was looking for the same.

    blogs.technet.microsoft.com/.../virtual-entities-relationships

    Let me know if it works for you and mark the answer a "verified"

  • peterstarbek Profile Picture
    15 on at

    Your sample shows relations between two virtual entities. I want to know if it Is possible to create a relationship between a “native”, lets say Account, and a “virtual” entity and how to achive this?

  • Verified answer
    David Jennaway Profile Picture
    14,065 on at

    In CRM, relationships always use the Guid data-type. You have 2 main options:

    1. If you can add a Guid column to the external data set, and populate it with the corresponding accountid, then you should be able to set the relationship based on this field
    2. If you can't add a Guid column to the external data set, I think you can probably create a dummy Guid column, and write your own data provider logic to get the data using the externalaccountid (the string reference) instead
  • peterstarbek Profile Picture
    15 on at

    Hi David.

    I understand Option 1.

    But I have case with Option 2. I can't add guid column to the external data set. How can i add dummy guid and how can I write my own provider logic? Could you reference me any example of that kind of provider logic?

  • Rizwan Aarif Profile Picture
    480 on at

    Do you have a number field in your data? If so you can make it a guid.

  • Rizwan Aarif Profile Picture
    480 on at

    Hi David,

    Is it possible to have 1:N (grid on CRM/native entity) of virtual entities?

    e.g.

    I have project entity in CRM and want to have a grid showing all the JIRA items of that project in a grid in CRM form. There is one common Project Code column in both data source (CRM and Odata source)?

    Thanks in Advance

  • ocnerf Profile Picture
    135 on at

    Hi David,

    I'm not sure that the solution 1 is correct. The relationship 1:N for non virtual entities to VE seem to be not supported.

    blog.yagasoft.com/.../virtual-entities-work-arounds

    The only possibility is to write a custom data provider.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans