groupMember Reference Field Not Displaying Correctly

  • 1
  • Problem
  • Updated 1 week ago
  • In Progress
After creating a new model for GroupMember and putting either one or both reference fields on a table "GroupId" or "UserOrGroupId" after selecting a valid user or group the display flashes the id then stays blank, I would expect it to display the name of the user or group that was selected 
Photo of Neil

Neil

  • 160 Points 100 badge 2x thumb
  • frustrated

Posted 1 year ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 28,086 Points 20k badge 2x thumb
Neil,

I'm not sure I'm following. Can you give us a bit more detail so the community can help? A video, or screenshots or even some xml would help.
Photo of Neil

Neil

  • 160 Points 100 badge 2x thumb
Hi,
Here is an XML simple set up of what I mean
and a screenshot of the result, notice the Account with Owner id reference field shows a name
but groupMember doesn't
<pre><skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true">
<models> <model id="groupuser" limit="20" query="true" createrowifnonefound="false" adapter="salesforce" type="" sobject="GroupMember"> <fields> <field id="GroupId"/> <field id="Group.Name"/> <field id="Id"/> <field id="UserOrGroupId" overridemetadata="false" ogdisplaytype="REFERENCE" displaytype="REFERENCE" targetobjects="User"/> </fields> <conditions/> <actions/> </model> <model id="acct" limit="20" query="true" createrowifnonefound="false" adapter="salesforce" type="" sobject="Account"> <fields> <field id="OwnerId"/> <field id="Owner.Name"/> </fields> <conditions/> <actions/> </model> </models> <components> <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="acct" buttonposition="" mode="read" uniqueid="sk-2yUpNG-119"> <fields> <field id="OwnerId" valuehalign="" type=""/> <field id="Owner.Name" valuehalign="" type=""/> </fields> <rowactions> <action type="edit"/> <action type="delete"/> </rowactions> <massactions usefirstitemasdefault="true"> <action type="massupdate"/> <action type="massdelete"/> </massactions> <views> <view type="standard"/> </views> </skootable> <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="groupuser" buttonposition="" mode="read" uniqueid="sk-2unyWY-93"> <fields> <field id="UserOrGroupId" valuehalign="" type=""/> <field id="GroupId"/> </fields> <rowactions> <action type="edit"/> <action type="delete"/> </rowactions> <massactions usefirstitemasdefault="true"> <action type="massupdate"/> <action type="massdelete"/> </massactions> <views> <view type="standard"/> </views> </skootable> </components> <resources> <labels/> <javascript/> <css/> </resources> <styles> <styleitem type="background" bgtype="none"/> </styles> </skuidpage></pre>
 
Photo of Matt Sones

Matt Sones, Champion

  • 28,086 Points 20k badge 2x thumb
Neil,

I think the problem is that the related UserOrGroupId.Name field isn't in the model.
Try removing the UserOrGroupId field from the model, and adding it again. 
Photo of Neil

Neil

  • 160 Points 100 badge 2x thumb
Thanks for the response, I think the problem is because it is a polymorphic field and Skuid is not handling it like other reference fields, you cannot access the metadata like a normal reference field.
Removing and Adding doesn't change anything
Photo of Matt Sones

Matt Sones, Champion

  • 28,086 Points 20k badge 2x thumb
Can you manually add the .Name field?
Photo of Neil

Neil

  • 160 Points 100 badge 2x thumb
When I add it directly to the XML Skuid fails with a big red error,
I have changed the method and am using a pop up to get around the issue.
so not sure if is a bug or not
Photo of Ashton Roberts

Ashton Roberts

  • 280 Points 250 badge 2x thumb
Hi there! 

I am having this same issue but with a non-polymorphic field and in a field editor rather than a table. But when users go to edit that reference field, it flashes the ID then goes blank. The users are still allowed to search a new value and select/save it, but the field remains visible blank until the page is refreshed. 

Any ideas would be greatly appreciated! 
Photo of Stephen Sells

Stephen Sells, Employee

  • 11,238 Points 10k badge 2x thumb
Can you post XML with standard objects and fields that shows this error?