Questions tagged [entityreference]
89 questions
1
vote
1 answer
Drupal: automatic relationship between content types
I have 2 content types in Drupal: one "publications" and one "authors".
In "authors" I have several nodes corresponding to several authors: "John", "Linda", "Susan" (for eg.);
In "publications" I have one field named "pub authors" of type "Entity…

BMM
- 690
- 1
- 13
- 26
1
vote
0 answers
Allow user to choose from his own referenced nodes
I have two content types:
Business listing
Product listing.
"Product listing" has an Entity Reference field. This field points to the nodes of "business listing". I want to allow user to choose from his own "business listing" nodes (during adding…

kamikes2003
- 31
- 1
1
vote
1 answer
XML: Entity Reference in ![CDATA[]]
An XML element with a list of characters enclosed in ![CDATA[]] so they're treated as characters, not as XML markup.

prgshn
- 53
- 4
1
vote
1 answer
Entity reference for JSON
I was wondering, is there something similar to entity reference substitution for JSON ? Let say i have the following JSON file
{
"sql1": "select * from ?? where date = 20030405",
"sql2": "select * from ?? where date = 20030708",
…

AbtPst
- 7,778
- 17
- 91
- 172
1
vote
1 answer
Embedding an entity refenrence add button on a q=node/view page
I am creating a 'Activity Management' site for that I have created 'Activity' and 'Participant' content types. 'Participant' content type has Full Name, Cell No, Email, Address fields and 'Activity' has title, location, time and activity participant…

Yogesh R.L
- 609
- 7
- 17
1
vote
0 answers
Drupal: How do I populate an email field from a single user “Name” reference?
How do I populate an email field from a single user “Name” reference?
I have a content type in which I use an entity reference to reference a Name field in a user account. I am trying to populate an email field in the content type with the email of…

Luke Gilfeather
- 11
- 1
1
vote
1 answer
Drupal - Query to count all nodes of content_type "A" in which field_b is "X"
I need to make a query for a drupal site. Initially I just needed to COUNT the number of nodes for a content type:
$query = "SELECT COUNT(*) amount FROM {node} n WHERE n.type ='A'";
$result = db_query($query)->fetch();
return $result->amount;
Now I…

zephirus
- 391
- 1
- 5
- 23
1
vote
1 answer
Mock a Linq to Sql EntityRef using Moq?
My datacontext contains a table named Userlog with a one to many relationship with table UserProfile.
In class UserLog
public UserProfile UserProfile
{
get {return this._UserProfile.Entity;}
}
In class UserProfile
public EntitySet…

Jeremy Holt
- 325
- 6
- 16
1
vote
1 answer
Drupal 7: how to filter view content (with entity reference field) based on current page content
in my drupal 7 I have 2 content-types like these:
ContentA
ContentB (with a field Entity Reference to ContentA)
In the front-end detail page of ContentA, I would love to show a block/view with a list of ContentB whose Entity Reference field is set…

webpaul
- 156
- 4
- 18
1
vote
2 answers
Drupal Entity Reference based on custom field
I hope that this question has not yet been answered, but I searched through lots of topics and I didn't find an answer.
Here is the problem: I'm trying to link two nodes from different content types, and I'd like to use another field than the Title…

fabienheureux
- 380
- 2
- 12
1
vote
1 answer
How to retrieve a CRM entity record by matching to an EntityReference
We have CRM 2011 on-premises and I am writing a C# aspx extension program. I need to retrieve a custom entity record by matching on two fields:
1) a lookup to an Entity Reference - I have the Guid of the Entity record.
2) an optionset - I have the…

DeveloperM
- 1,129
- 7
- 17
- 30
1
vote
2 answers
EntityReference has an EntityKey property value that does not match?
I am attempting to add some entities that I have created. When I try and add the entity in question to the set (see code below) I get the following error:
"The object could not be added or attached because its EntityReference has an EntityKey…

Graham Conzett
- 8,344
- 11
- 55
- 94
1
vote
1 answer
Drupal add content in another content's form
I'm using Drupal 7 and I'm currently facing the following problem:
I have a database that among other data consists of addresses and services. The relationship is such that every service needs to have an address (just one). In Drupal both addresses…

Eric Cohones
- 11
- 1
1
vote
0 answers
Load empty values from referenced node in Views (Drupal 7)
I have a view displaying nodes of two content types. The nodes all have a cck field made with Entity Reference referencing a "parent" node. If the displayed node in the view has an empty value, the view should display the value in the parent node.…

Mikkel R. Lund
- 2,336
- 1
- 31
- 44
0
votes
1 answer
XML - entity references versus encoding
What is the difference between encoding and entity references in xml ?

SoftwareGeek
- 15,234
- 19
- 61
- 78