• Matt Rich 7
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Is there a way to embed a Visualforce page into a list view? Let me explain what I have done so far:

I have created a custom object within Salesforce called "Service Requests". Within the "Service Requests" object I have created a custom field called "Store Number". "Store Number" is a lookup relationship field that is related to another custom object called "Stores". When a service request is made we always include the store number so that we can tell which store needs service done. For instance, Service Request 0006 is for store number 2368. Now, if we use our mouse to hover over the store number, 2368, then we will see a hover detail window telling us that the store is located in East Stroudsburg, PA. But my client doesn't want to have to hover over the store number every time to see the location of the store. So, I have created a Visualforce page which references the store's location. Here is my code:


<apex:page standardController="Service_Request__c"> {!Service_Request__c.Store_Number__r.City__c}, {!Service_Request__c.Store_Number__r.State__c}</apex:page>

Using this code I am able to auto populate the store's location by referencing the custom fields, "City" and "State", which are found in the custom object "Stores". However, my client wants to be able to go into the "Service Requests" tab and, under the list views, he wants to see not only the "Request Number" (0006) and "Store Number" (2368) but also the "City" and "State" of the store (which would be related to the Store Number). But when I go to edit the list views I don't see the VF page in "Available Fields", so I can't move it over into "Selected Fields". 

Now, I've tried this code that someone else gave me:
<apex:pagestandardController="Service_Request__c" recordSetVar="s">
<apex:repeat value="{!s}" var="c">
<apex:outputText value="{!Service_Request__c.Store_Number__r.City__c}"/>
<apex:outputText value={!Service_Request__c.Store_Number__r.State__c}"/>
 <apex:outPutText value={!serviceRequest}/>
 <!--Add the fields which you want to show in thw list-->
  </apex:repeat>
</apex:page>

But every time I try to run it I keep getting a syntax error that says:

"Error: Unknown property 'Service_Request__cStandardController.serviceRequest'"

What do I do about this? Do I need to create a custom controller in the Developer Console? And if so, how do I begin to do that?? Any help would be greatly appreciated! Thank you very much!

Matt
Is there a way to embed a Visualforce page into a list view? Let me explain what I have done so far:

I have created a custom object within Salesforce called "Service Requests". Within the "Service Requests" object I have created a custom field called "Store Number". "Store Number" is a lookup relationship field that is related to another custom object called "Stores". When a service request is made we always include the store number so that we can tell which store needs service done. For instance, Service Request 0006 is for store number 2368. Now, if we use our mouse to hover over the store number, 2368, then we will see a hover detail window telling us that the store is located in East Stroudsburg, PA. But my client doesn't want to have to hover over the store number every time to see the location of the store. So, I have created a Visualforce page which references the store's location. Here is my code:


<apex:page standardController="Service_Request__c"> {!Service_Request__c.Store_Number__r.City__c}, {!Service_Request__c.Store_Number__r.State__c}</apex:page>

Using this code I am able to auto populate the store's location by referencing the custom fields, "City" and "State", which are found in the custom object "Stores". However, my client wants to be able to go into the "Service Requests" tab and, under the list views, he wants to see not only the "Request Number" (0006) and "Store Number" (2368) but also the city and state of the store (which would be related to the Store Number). But when I go to edit the list views I don't see the VF page in "Available Fields", so I can't move it over into "Selected Fields". What should I do here? Any help would be greatly appreciated! Thank you!
I have created a custom object within Salesforce called "Service Requests". Within the "Service Requests" object I have created a custom field called "Store Number". "Store Number" is a lookup relationship field that is related to another custom object called "Stores". When a service request is made we always include the store number so that we can tell which store needs service done. For instance, Service Request 0006 is for store number 2368. Now, if we use our mouse to hover over the store number, 2368, then we will see a hover detail window telling us that the store is located in East Stroudsburg, PA. My question is, can I somehow relate the location of the store to the service request that is being made for that store? I want to be able to see the city and state that the service request is in. So, I should be able to tell that Service Request 0006 is a service request for East Stroudsburg, PA based off the fact that the service request is for store number 2368 (which is located in East Stroudsburg, PA). Am I being clear?

Let me break it down further:
Basically my client wants to be able to go into the "Service Requests" tab and, under the list views, he wants to see not only the "Request Number" (0006) and "Store Number" (2368) but also the city and state of the store (which would be related to the Store Number). I have already created a "City" and "State" field within the "Service Requests" object that is a picklist field allowing you to choose some predefined cities and states. But my client doesn't want to have manually choose a city and state each time he makes a service request. He is already having to manually look up the store number for each request, so he shouldn't have to pick from cities and states either. He wants it to where, once the store number is chosen, the city and state of that store will automatically populate within the "City" and "State" fields. Is this possible? Can I somehow create a field to field relationship to make this work? Will this require writing some Apex? I hope I am making sense. Thank you very much for taking the time to help me!
Is there a way to embed a Visualforce page into a list view? Let me explain what I have done so far:

I have created a custom object within Salesforce called "Service Requests". Within the "Service Requests" object I have created a custom field called "Store Number". "Store Number" is a lookup relationship field that is related to another custom object called "Stores". When a service request is made we always include the store number so that we can tell which store needs service done. For instance, Service Request 0006 is for store number 2368. Now, if we use our mouse to hover over the store number, 2368, then we will see a hover detail window telling us that the store is located in East Stroudsburg, PA. But my client doesn't want to have to hover over the store number every time to see the location of the store. So, I have created a Visualforce page which references the store's location. Here is my code:


<apex:page standardController="Service_Request__c"> {!Service_Request__c.Store_Number__r.City__c}, {!Service_Request__c.Store_Number__r.State__c}</apex:page>

Using this code I am able to auto populate the store's location by referencing the custom fields, "City" and "State", which are found in the custom object "Stores". However, my client wants to be able to go into the "Service Requests" tab and, under the list views, he wants to see not only the "Request Number" (0006) and "Store Number" (2368) but also the "City" and "State" of the store (which would be related to the Store Number). But when I go to edit the list views I don't see the VF page in "Available Fields", so I can't move it over into "Selected Fields". 

Now, I've tried this code that someone else gave me:
<apex:pagestandardController="Service_Request__c" recordSetVar="s">
<apex:repeat value="{!s}" var="c">
<apex:outputText value="{!Service_Request__c.Store_Number__r.City__c}"/>
<apex:outputText value={!Service_Request__c.Store_Number__r.State__c}"/>
 <apex:outPutText value={!serviceRequest}/>
 <!--Add the fields which you want to show in thw list-->
  </apex:repeat>
</apex:page>

But every time I try to run it I keep getting a syntax error that says:

"Error: Unknown property 'Service_Request__cStandardController.serviceRequest'"

What do I do about this? Do I need to create a custom controller in the Developer Console? And if so, how do I begin to do that?? Any help would be greatly appreciated! Thank you very much!

Matt
Is there a way to embed a Visualforce page into a list view? Let me explain what I have done so far:

I have created a custom object within Salesforce called "Service Requests". Within the "Service Requests" object I have created a custom field called "Store Number". "Store Number" is a lookup relationship field that is related to another custom object called "Stores". When a service request is made we always include the store number so that we can tell which store needs service done. For instance, Service Request 0006 is for store number 2368. Now, if we use our mouse to hover over the store number, 2368, then we will see a hover detail window telling us that the store is located in East Stroudsburg, PA. But my client doesn't want to have to hover over the store number every time to see the location of the store. So, I have created a Visualforce page which references the store's location. Here is my code:


<apex:page standardController="Service_Request__c"> {!Service_Request__c.Store_Number__r.City__c}, {!Service_Request__c.Store_Number__r.State__c}</apex:page>

Using this code I am able to auto populate the store's location by referencing the custom fields, "City" and "State", which are found in the custom object "Stores". However, my client wants to be able to go into the "Service Requests" tab and, under the list views, he wants to see not only the "Request Number" (0006) and "Store Number" (2368) but also the city and state of the store (which would be related to the Store Number). But when I go to edit the list views I don't see the VF page in "Available Fields", so I can't move it over into "Selected Fields". What should I do here? Any help would be greatly appreciated! Thank you!
I have created a custom object within Salesforce called "Service Requests". Within the "Service Requests" object I have created a custom field called "Store Number". "Store Number" is a lookup relationship field that is related to another custom object called "Stores". When a service request is made we always include the store number so that we can tell which store needs service done. For instance, Service Request 0006 is for store number 2368. Now, if we use our mouse to hover over the store number, 2368, then we will see a hover detail window telling us that the store is located in East Stroudsburg, PA. My question is, can I somehow relate the location of the store to the service request that is being made for that store? I want to be able to see the city and state that the service request is in. So, I should be able to tell that Service Request 0006 is a service request for East Stroudsburg, PA based off the fact that the service request is for store number 2368 (which is located in East Stroudsburg, PA). Am I being clear?

Let me break it down further:
Basically my client wants to be able to go into the "Service Requests" tab and, under the list views, he wants to see not only the "Request Number" (0006) and "Store Number" (2368) but also the city and state of the store (which would be related to the Store Number). I have already created a "City" and "State" field within the "Service Requests" object that is a picklist field allowing you to choose some predefined cities and states. But my client doesn't want to have manually choose a city and state each time he makes a service request. He is already having to manually look up the store number for each request, so he shouldn't have to pick from cities and states either. He wants it to where, once the store number is chosen, the city and state of that store will automatically populate within the "City" and "State" fields. Is this possible? Can I somehow create a field to field relationship to make this work? Will this require writing some Apex? I hope I am making sense. Thank you very much for taking the time to help me!