Skip to main content
deleted 24 characters in body
Source Link
Adrian Larson
  • 151.4k
  • 38
  • 247
  • 431

It's not gibberish, it's an Id, which is the type of data Salesforce stores for all Lookup or Master Detail relationships. If you want a linked name, you will need something more like the below. I would change the var to assignment to be less confusing.

You can actually just switch from outputText to outputField because you are inusing a reference pageBlockTableId. But if you are doing this elsewhereusing a record's own Id, you may need to construct the linked name yourself, which would look like:

<apex:outputLink value="{!$Action.User.View, assignmentuser.Team_Member__cId}">
    {!assignment.Team_Member__ruser.Name}
</apex:outputLink>

SOQL:

SELECT Team_Member__c, Team_Member__r.Name FROM Team_Assignment

It's not gibberish, it's an Id, which is the type of data Salesforce stores for all Lookup or Master Detail relationships. If you want a linked name, you will need something more like the below. I would change the var to assignment to be less confusing.

You can actually just switch from outputText to outputField because you are in a pageBlockTable. But if you are doing this elsewhere, you may need to construct the linked name yourself, which would look like:

<apex:outputLink value="{!$Action.User.View, assignment.Team_Member__c}">
    {!assignment.Team_Member__r.Name}
</apex:outputLink>

SOQL:

SELECT Team_Member__c, Team_Member__r.Name FROM Team_Assignment

It's not gibberish, it's an Id, which is the type of data Salesforce stores for all Lookup or Master Detail relationships. If you want a linked name, you will need something more like the below. I would change the var to assignment to be less confusing.

You can actually just switch from outputText to outputField because you are using a reference Id. But if you are doing this using a record's own Id, you may need to construct the linked name yourself, which would look like:

<apex:outputLink value="{!$Action.User.View, user.Id}">
    {!user.Name}
</apex:outputLink>
added 8 characters in body
Source Link
Adrian Larson
  • 151.4k
  • 38
  • 247
  • 431

It's not gibberish, it's an Id, which is the type of data Salesforce stores for all Lookup or Master Detail relationships. If you want a linked name, you will need something more like the below. I would change the var to assignment to be less confusing.

You can actually just switch from outputText to outputField because you are in a pageBlockTable. But if you are doing this elsewhere, you may need to construct the linked name yourself, which would look like:

<apex:pageBlockTable value="{!team}" var="assignment">
    <apex:column headerValue="{!$ObjectType.User.fields.Name.label}">
        <apex:outputLink value="{!$Action.User.View, assignment.Team_Member__c}">
            {!assignment.Team_Member__r.Name}
        </apex:outputLink>
    <apex:column>
</apex:pageBlockTable>

SOQL:

SELECT Team_Member__c, Team_Member__r.Name FROM Team_Assignment

It's not gibberish, it's an Id, which is the type of data Salesforce stores for all Lookup or Master Detail relationships. If you want a linked name, you will need something more like the below. I would change the var to assignment to be less confusing.

<apex:pageBlockTable value="{!team}" var="assignment">
    <apex:column headerValue="{!$ObjectType.User.fields.Name.label}">
        <apex:outputLink value="{!$Action.User.View, assignment.Team_Member__c}">
            {!assignment.Team_Member__r.Name}
        </apex:outputLink>
    <apex:column>
</apex:pageBlockTable>

SOQL:

SELECT Team_Member__c, Team_Member__r.Name FROM Team_Assignment

It's not gibberish, it's an Id, which is the type of data Salesforce stores for all Lookup or Master Detail relationships. If you want a linked name, you will need something more like the below. I would change the var to assignment to be less confusing.

You can actually just switch from outputText to outputField because you are in a pageBlockTable. But if you are doing this elsewhere, you may need to construct the linked name yourself, which would look like:

<apex:outputLink value="{!$Action.User.View, assignment.Team_Member__c}">
    {!assignment.Team_Member__r.Name}
</apex:outputLink>

SOQL:

SELECT Team_Member__c, Team_Member__r.Name FROM Team_Assignment
added 210 characters in body
Source Link
Adrian Larson
  • 151.4k
  • 38
  • 247
  • 431

It's not gibberish, it's an Id, which is the type of data Salesforce stores for all Lookup or Master Detail relationships. If you want a linked name, you will need something more like the below. I would change the var to assignment to be less confusing.

<apex:pageBlockTable value="{!team}" var="assignment">
    <apex:column headerValue="{!$ObjectType.User.fields.Name.label}">
        <apex:outputLink value="{!$Action.User.View, assignment.Team_Member__c}">
            {!assignment.Team_Member__r.Name}
        </apex:outputLink>
    <apex:column>
</apex:pageBlockTable>

SOQL:

SELECT Team_Member__c, Team_Member__r.Name FROM Team_Assignment

It's not gibberish, it's an Id, which is the type of data Salesforce stores for all Lookup or Master Detail relationships. If you want a linked name, you will need something more like the below. I would change the var to assignment to be less confusing.

<apex:outputLink value="{!$Action.User.View, assignment.Team_Member__c}">
    {!assignment.Team_Member__r.Name}
</apex:outputLink>

SOQL:

SELECT Team_Member__c, Team_Member__r.Name FROM Team_Assignment

It's not gibberish, it's an Id, which is the type of data Salesforce stores for all Lookup or Master Detail relationships. If you want a linked name, you will need something more like the below. I would change the var to assignment to be less confusing.

<apex:pageBlockTable value="{!team}" var="assignment">
    <apex:column headerValue="{!$ObjectType.User.fields.Name.label}">
        <apex:outputLink value="{!$Action.User.View, assignment.Team_Member__c}">
            {!assignment.Team_Member__r.Name}
        </apex:outputLink>
    <apex:column>
</apex:pageBlockTable>

SOQL:

SELECT Team_Member__c, Team_Member__r.Name FROM Team_Assignment
added 255 characters in body
Source Link
Adrian Larson
  • 151.4k
  • 38
  • 247
  • 431
Loading
Source Link
Adrian Larson
  • 151.4k
  • 38
  • 247
  • 431
Loading