-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
3Questions
-
1Replies
Custom label reference not working on onclick javascript for a button
I have a custom label with value and wanted to reference on onclick javascript for a button.
Here is the code for Onclick Javascript
window.location = '/_ui/core/email/author/EmailAuthor?p3_lkid={!Incident__c.Id}&p3={!Incident__c.Name}&p24={!Incident__c.Requester_email__c}&p6=Requesting further information regarding {!Incident__c.Name}&template_id='{!$Label.Email_Temp_ID_for_Request_Button_on_Incident_Object}''
Throwing error as Unexpected Identifier
Here is the code for Onclick Javascript
window.location = '/_ui/core/email/author/EmailAuthor?p3_lkid={!Incident__c.Id}&p3={!Incident__c.Name}&p24={!Incident__c.Requester_email__c}&p6=Requesting further information regarding {!Incident__c.Name}&template_id='{!$Label.Email_Temp_ID_for_Request_Button_on_Incident_Object}''
Throwing error as Unexpected Identifier
-
- TharunKumar
- July 28, 2016
- Like
- 0
- Continue reading or reply
VisualForce TrailHead Error
Create a Visualforce page that uses a custom controller to display a list of cases with the status of 'New'.The page must be named 'NewCaseList'.
The custom controller Apex class must be named 'NewCaseListController'.
The 'NewCaseListController' Apex class must have a publically scoped method named 'getNewCases'.
The 'getNewCases' Apex method should have the return type of 'List' and return a list of case records with the ID and CaseNumber fields and filtered to only have a status of 'New'.
The 'NewCaseList' Visualforce page must use an apex:repeat component which is bound to 'newCases'.
The apex:repeat component must refer to the var attribute as 'case'.
Within the apex:repeat component, bind a apex:outputLink component to the ID of the case so that the page directs the user to the detail page of the respective case record.
I tried this code i am able to retrieve the case records and clicking on each record showing the detail page of that record.But Still Trail Head is showing error.Can someone guide me where I went wrong
VisualForce page:
<apex:page controller="NewCaseListController">
<apex:repeat value="{!newCases}" var="Case">
<li>
<apex:outputLink value="/{!Case.Id}">
{!Case.CaseNumber}
</apex:outputLink>
</li>
</apex:repeat>
</apex:page>
Custom Contoller:
public class NewCaseListController {
public static List<Case> getNewCases()
{
List<Case> caseList = new List<Case>();
for(Case ct: [Select Id, CaseNumber FROM Case WHERE Status = 'New'])
caseList.add(ct);
return caseList;
}
}
The custom controller Apex class must be named 'NewCaseListController'.
The 'NewCaseListController' Apex class must have a publically scoped method named 'getNewCases'.
The 'getNewCases' Apex method should have the return type of 'List' and return a list of case records with the ID and CaseNumber fields and filtered to only have a status of 'New'.
The 'NewCaseList' Visualforce page must use an apex:repeat component which is bound to 'newCases'.
The apex:repeat component must refer to the var attribute as 'case'.
Within the apex:repeat component, bind a apex:outputLink component to the ID of the case so that the page directs the user to the detail page of the respective case record.
I tried this code i am able to retrieve the case records and clicking on each record showing the detail page of that record.But Still Trail Head is showing error.Can someone guide me where I went wrong
VisualForce page:
<apex:page controller="NewCaseListController">
<apex:repeat value="{!newCases}" var="Case">
<li>
<apex:outputLink value="/{!Case.Id}">
{!Case.CaseNumber}
</apex:outputLink>
</li>
</apex:repeat>
</apex:page>
Custom Contoller:
public class NewCaseListController {
public static List<Case> getNewCases()
{
List<Case> caseList = new List<Case>();
for(Case ct: [Select Id, CaseNumber FROM Case WHERE Status = 'New'])
caseList.add(ct);
return caseList;
}
}
-
- TharunKumar
- September 21, 2015
- Like
- 0
- Continue reading or reply
Salesforce TrailHead Error
Using a Standard List Controller, create a Visualforce page which displays a list of Accounts with links to their respective record detail pages.The page must be named 'AccountList'.
It must reference the Account standard controller.
It must have a recordSetVar equal to 'accounts'.
It must have a Visualforce apex:repeat component.
The repeater must have the var attribute set to 'a'.
The repeater must use the <li> HTML list tag
The repeater must use the apex:outputLink component to link to the respective record detail page
HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. '/<record id>')
I tried this code i am able to retrieve the records and clicking on each record showing the detail page of that record.But Still Trail Head is showing error.Can someone guide me if I am wrong
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock title="Accounts">
<apex:repeat value="{!Accounts}" var="a">
<li>
<apex:outputLink value="{!URLFOR($Action.Account.view, a.id)}">{!a.Name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
It must reference the Account standard controller.
It must have a recordSetVar equal to 'accounts'.
It must have a Visualforce apex:repeat component.
The repeater must have the var attribute set to 'a'.
The repeater must use the <li> HTML list tag
The repeater must use the apex:outputLink component to link to the respective record detail page
HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. '/<record id>')
I tried this code i am able to retrieve the records and clicking on each record showing the detail page of that record.But Still Trail Head is showing error.Can someone guide me if I am wrong
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock title="Accounts">
<apex:repeat value="{!Accounts}" var="a">
<li>
<apex:outputLink value="{!URLFOR($Action.Account.view, a.id)}">{!a.Name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
-
- TharunKumar
- September 14, 2015
- Like
- 1
- Continue reading or reply
Salesforce TrailHead Error
Using a Standard List Controller, create a Visualforce page which displays a list of Accounts with links to their respective record detail pages.The page must be named 'AccountList'.
It must reference the Account standard controller.
It must have a recordSetVar equal to 'accounts'.
It must have a Visualforce apex:repeat component.
The repeater must have the var attribute set to 'a'.
The repeater must use the <li> HTML list tag
The repeater must use the apex:outputLink component to link to the respective record detail page
HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. '/<record id>')
I tried this code i am able to retrieve the records and clicking on each record showing the detail page of that record.But Still Trail Head is showing error.Can someone guide me if I am wrong
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock title="Accounts">
<apex:repeat value="{!Accounts}" var="a">
<li>
<apex:outputLink value="{!URLFOR($Action.Account.view, a.id)}">{!a.Name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
It must reference the Account standard controller.
It must have a recordSetVar equal to 'accounts'.
It must have a Visualforce apex:repeat component.
The repeater must have the var attribute set to 'a'.
The repeater must use the <li> HTML list tag
The repeater must use the apex:outputLink component to link to the respective record detail page
HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. '/<record id>')
I tried this code i am able to retrieve the records and clicking on each record showing the detail page of that record.But Still Trail Head is showing error.Can someone guide me if I am wrong
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock title="Accounts">
<apex:repeat value="{!Accounts}" var="a">
<li>
<apex:outputLink value="{!URLFOR($Action.Account.view, a.id)}">{!a.Name}
</apex:outputLink>
</li>
</apex:repeat>
</apex:pageBlock>
</apex:page>
-
- TharunKumar
- September 14, 2015
- Like
- 1
- Continue reading or reply
VisualForce TrailHead Error
Create a Visualforce page that uses a custom controller to display a list of cases with the status of 'New'.The page must be named 'NewCaseList'.
The custom controller Apex class must be named 'NewCaseListController'.
The 'NewCaseListController' Apex class must have a publically scoped method named 'getNewCases'.
The 'getNewCases' Apex method should have the return type of 'List' and return a list of case records with the ID and CaseNumber fields and filtered to only have a status of 'New'.
The 'NewCaseList' Visualforce page must use an apex:repeat component which is bound to 'newCases'.
The apex:repeat component must refer to the var attribute as 'case'.
Within the apex:repeat component, bind a apex:outputLink component to the ID of the case so that the page directs the user to the detail page of the respective case record.
I tried this code i am able to retrieve the case records and clicking on each record showing the detail page of that record.But Still Trail Head is showing error.Can someone guide me where I went wrong
VisualForce page:
<apex:page controller="NewCaseListController">
<apex:repeat value="{!newCases}" var="Case">
<li>
<apex:outputLink value="/{!Case.Id}">
{!Case.CaseNumber}
</apex:outputLink>
</li>
</apex:repeat>
</apex:page>
Custom Contoller:
public class NewCaseListController {
public static List<Case> getNewCases()
{
List<Case> caseList = new List<Case>();
for(Case ct: [Select Id, CaseNumber FROM Case WHERE Status = 'New'])
caseList.add(ct);
return caseList;
}
}
The custom controller Apex class must be named 'NewCaseListController'.
The 'NewCaseListController' Apex class must have a publically scoped method named 'getNewCases'.
The 'getNewCases' Apex method should have the return type of 'List' and return a list of case records with the ID and CaseNumber fields and filtered to only have a status of 'New'.
The 'NewCaseList' Visualforce page must use an apex:repeat component which is bound to 'newCases'.
The apex:repeat component must refer to the var attribute as 'case'.
Within the apex:repeat component, bind a apex:outputLink component to the ID of the case so that the page directs the user to the detail page of the respective case record.
I tried this code i am able to retrieve the case records and clicking on each record showing the detail page of that record.But Still Trail Head is showing error.Can someone guide me where I went wrong
VisualForce page:
<apex:page controller="NewCaseListController">
<apex:repeat value="{!newCases}" var="Case">
<li>
<apex:outputLink value="/{!Case.Id}">
{!Case.CaseNumber}
</apex:outputLink>
</li>
</apex:repeat>
</apex:page>
Custom Contoller:
public class NewCaseListController {
public static List<Case> getNewCases()
{
List<Case> caseList = new List<Case>();
for(Case ct: [Select Id, CaseNumber FROM Case WHERE Status = 'New'])
caseList.add(ct);
return caseList;
}
}
- TharunKumar
- September 21, 2015
- Like
- 0
- Continue reading or reply