-
ChatterFeed
-
0Best Answers
-
3Likes Received
-
0Likes Given
-
16Questions
-
58Replies
Understanding Execution Context - Apex trigger Trailhead Issue.
I'm having an issue with this particular challenge below:
Write an Apex trigger that fires before records are inserted and ensures that the ShippingState field has the same value as the BillingState field.
Create an Apex class named AccountTriggerHandler that contains a public static method called CreateAccounts to accept the List of Account objects.
For each Account record, before saving, ensure that the ShippingState field has the same value as the BillingState field.
Write an Apex trigger named AccountTrigger that fires before records are inserted.
The Apex trigger must call the AccountTriggerHandler.CreateAccounts() method with the collection of new records.
Create a test class named AccountTriggerTest that inserts 200 Account records with a BillingState of CA. After the insert, test to ensure that all 200 records have a ShippingState of CA.
Before verifying this challenge, run your test class at least once using the Developer Console Run All feature.
This is my Challenge Error:
Challenge Not yet complete... here's what's wrong:
The Trigger 'AccountTrigger' does not appear to be calling the AccountTriggerHandler class correctly or using isBefore or isInsert content variables.
These are my codings below :
AccountTriggerHandler
AccountTrigger - Trigger On Account Object
AccountTriggerTest
P.S. I'm pretty new to the developing with Apex so I'm learning and growing so the help is appreciated community.
-
- Andrew Eversley
- March 28, 2016
- Like
- 0
- Continue reading or reply
Creating the AccountLocator Component Trailhead Project Issue
I'm currently working on the "Build an Account Geolocation App" project in the Trailhead Project section. I'm having an issue on "Step 2: Use the AccountLocator Component in a Lightning Application"
My issue is this:
The Steps:
1.In the Developer Console, select File > New > Lightning Application.
2.Specify AccountLocatorApp as the bundle name, and click Submit.
3.On the AccountLocatorApp.cmp tab, implement the application as follows:
After I go to step 2 and submit the AccountLocatorApp name it gives me an error stating:
"duplicate value found: <unknown> duplicates value on record with id: <unknown>"
Then this error:
Operation did not complete "Long running operation did not complete, continuing in background"
I would like some assistance or insight into this issue community. Thanks.
-
- Andrew Eversley
- March 17, 2016
- Like
- 0
- Continue reading or reply
Build the AccountList Component Trailhead Error
I'm receiving this error as I try to verify the challenge:
Step Not yet complete... here's what's wrong:
The component is not using 'controller=AccountsController'
Note: you may run into errors if you've skipped previous steps.
When I completed Step 5 of the challenge "Test The App" when I did he Preview Aura gave me an error stating
"Something has gone wrong. Cannot read property 'Ud' of undefined. Please try again."
Has anyone encountered these errors, or can give any advice?
-
- Andrew Eversley
- March 15, 2016
- Like
- 0
- Continue reading or reply
Creating a New Development Org...for Trailhead Issues
I have a inquiry that may, or may not, have been answered here but i'm a little uncertain on how to go about it. I've read on some issues with Trailhead challenges that many recommend spinning up a new Dev Org and taking the challenge in that org to resolve the challenge and "still" get the challenge points on the same username you use in Trailhead.
I'm uncertain of the process of how to go about doing both of those things. Could someone walk me through how this is done, and how to make sure the new dev org sessions apply the challenge points to my exisiting Trailhead login credentials. Thanx in advance.
-
- Andrew Eversley
- February 02, 2016
- Like
- 0
- Continue reading or reply
Setting up Lightning Connect - Pb with API Trailhead Error
I'm working on the "Setting up Lightning Connect - Pb with API Trailhead Module and after submitting the Check Challenge I've received this error below:
"Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.ExternalObjectException: data.api.DataSourceException: This data is no longer available. The "Phone" table in the external data source is currently unavailable. Try again later or contact your administrator for help."
Has anyone come across this error, or have any ideas on what the issue is or on how to proceed to complete the challenge. Thanks.
-
- Andrew Eversley
- February 01, 2016
- Like
- 0
- Continue reading or reply
Creating and Using Custom Controllers Trailhead Challenge Problem
Need some help on this challenge " Creating and Using Custom Controllers"
Here is my criteria:
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.
Here is my error received:
Challenge not yet complete... here's what's wrong:
Case records were not returned upon calling 'getNewCases'. Either the method does not exist, or it does not return the expected list of cases.
Here are my codes: ( I've adjusted some code in respect to other threads on the subject to make you aware)
Controller Class Code
New Case List VFP Code
Please advise this has been a very interesting one from a code perspective and being a newbie of sorts quite challenging lol.
-
- Andrew Eversley
- August 25, 2015
- Like
- 0
- Continue reading or reply
Displaying Records, Fields, and Tables - Visualforce Page - Trailhead Error
Need some assistance with and error on a VisualSource Page Trailhead Challenge
Here is the Criteria:
Create a page which displays a subset of Opportunity fields using apex:outputField components. Bind the Name, Amount, Close Date and Account Name fields to the apex:outputField components.The page must be named 'OppView'.
It must reference the Opportunity standard controller.
It must have an apex:outputField component bound to the Opportunity Name.
It must have an apex:outputField component bound to the Opportunity Amount.
It must have an apex:outputField component bound to the Opportunity Close Date.
It must have an apex:outputField component bound to the Account Name of the Opportunity.
Here is the error I'm receiving
Challenge not yet complete... here's what's wrong:
The page does not include a apex:outputField component bound to the opportunity name
Here is my code for the page:
<apex:page standardController="Opportunity" >
<apex:pageBlock title="Opportunities">
<apex:pageBlockSection>
<apex:outputField value="{! Opportunity.Account.Name}"/>
<apex:outputField value="{! Opportunity.Amount }"/>
<apex:outputField value="{! Opportunity.CloseDate }"/>
<apex:outputField value="{! Opportunity.Accountid }"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
Please Advise Community!!
-
- Andrew Eversley
- August 22, 2015
- Like
- 1
- Continue reading or reply
Bulk Apex Triggers Trailhead Error
Hello Community,
Having an issue with a Bulk Apex Trigger challenge here, hope you guys can assist.
Here is the critieria:
To complete this challenge, you need to add a trigger for Opportunity. The trigger will add a task to any opportunity inserted or updated with the stage of 'Closed Won'. The task's subject must be 'Follow Up Test Task'.The Apex trigger must be called 'ClosedOpportunityTrigger'
With 'ClosedOpportunityTrigger' active, if an opportunity is inserted or updated with a stage of 'Closed Won', it will have a task created with the subject 'Follow Up Test Task'.
To associate the task with the opportunity, fill the 'WhatId' field with the opportunity ID.
This challenge specifically tests 200 records in one operation.
Here is the Error Received:
Challenge not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Discount_Percent__c]: [Discount_Percent__c]
Here Is My Code:
trigger ClosedOpportunityTrigger on Opportunity (after insert, after update) {
List<Task> taskList = new List<Task>();
for(Opportunity opp : Trigger.new) {
//Only create Follow Up Task only once when Opp StageName is to 'Closed Won' on Create
if(Trigger.isInsert) {
if(Opp.StageName == 'Closed Won') {
taskList.add(new Task(Subject = 'Follow Up Test Task', WhatId = opp.Id));
}
}
//Only create Follow Up Task only once when Opp StageName changed to 'Closed Won' on Update
if(Trigger.isUpdate) {
if(Opp.StageName == 'Closed Won'
&& Opp.StageName != Trigger.oldMap.get(opp.Id).StageName) {
taskList.add(new Task(Subject = 'Follow Up Test Task', WhatId = opp.Id));
}
}
}
if(taskList.size()>0) {
insert taskList;
}
}
Please Note: I appended the code from SumitKumar from another post which worked for others as I changed my code to suit the suggested code.above. It seems I may have an insert dml exception issue maybe caused by an earlier code insertion. PLEASE ADVISE
-
- Andrew Eversley
- August 20, 2015
- Like
- 0
- Continue reading or reply
Writing SOSL Queries - Trailhead Challenge Error
Hello, Community, I am facing problem in solving this challenge, please advise.
Here is the criteria presented:
With SOSL you can search against different object types that may have similar data, such as contacts and leads. To pass this challenge, create an Apex class that returns both contacts and leads that have first or last name matching the incoming parameter.
The Apex class must be called 'ContactAndLeadSearch' and be in the public scope.
The Apex class must have a public static method called 'searchContactsAndLeads'.
Because SOSL indexes data for searching, you must create a Contact record and Lead record before checking this challenge. Both records must have the last name 'Smith'. The challenge uses these records for the SOSL search.
The return type for 'searchContactsAndLeads' must be 'List<List< SObject>>'
The 'searchContactsAndLeads' method must accept an incoming string as a parameter, find any contact or lead that matches the string as part of either the first or last name and then return those records.
Error received:
Challenge not yet complete... here's what's wrong:
Executing the 'searchContactsAndLeads' method failed. Either the method does not exist, is not static, or does not return the expected search results.
Here is my code:
public class ContactAndLeadSearch{
public static List<List< SObject>> searchContactsAndLead(String name)
{
List<List<sObject>> result=[FIND :name IN ALL FIELDS RETURNING Lead(LastName),Contact(LastName)];
return result;
}
}
PLEASE ADVISE...Thanks Community!!!
-
- Andrew Eversley
- August 19, 2015
- Like
- 1
- Continue reading or reply
Using Formula Fields Challenge - The 'Matrix of Leads' report does not have the Rating field as a column grouping.
I was just revisiting an old challenge that I haven't completed and came upon this error and wanted to see if anyone came up with a solution regarding it. It is the "Using Formula Fields Challenge"
Error Received - The 'Matrix of Leads' report does not have the Rating field as a column grouping.
Please Advise. Thanx
-
- Andrew Eversley
- August 12, 2015
- Like
- 0
- Continue reading or reply
Creating Wizards with Visual Workflow Challenge Error Part II
Error I'm receiving when checking challenge:
Challenge not yet complete... here's what's wrong:
A Visualforce page named 'FlowPage' was not found.
Screenshots :
Flowpage Verified
2. Flow Page Error
2.
Hopefully you guys can add some feedback, I've been working on these for a good part of the day and I'm a little beat so I will address this tomorrow around lunch time. I hope to have some positive feedback from the community then.
-
- Andrew Eversley
- August 05, 2015
- Like
- 0
- Continue reading or reply
Creating Wizards with Visual Workflow Challenge Error
Ok, here is the error I'm receiving for his challenge.
Challenge not yet complete... here's what's wrong:
A Visualforce page named 'FlowPage' was not found.
I will add the screenshots below:
1. New Customer Flow
2. FlowScreen
2.
3. Account Creation
3. Contact Creation
4.
Opportunity Creation
4.
I will add the screenshots for the Visual Force Pages on part II of this
-
- Andrew Eversley
- August 05, 2015
- Like
- 0
- Continue reading or reply
Automating Time-based Actions with Workflow Challenge Error
I'm having an error with this challenge on Automating Time-based Actions with Workflow: Error Below
Challenge not yet complete... here's what's wrong:
The 'Set Case to Escalated' Workflow field update action was not found.
Here are my screenshots for the criteria and the rule activation below:
Please Advise....Thanx
-
- Andrew Eversley
- August 04, 2015
- Like
- 0
- Continue reading or reply
Automating Processes with the Lightning Process Builder Challenge Error
Hello Salesforce Community,
I'm having some issues with the Lightning process building challenge myself. Here is the error I've received:
Challenge not yet complete... here's what's wrong:
An update to an account record failed to update the mailing address fields of all child contact records. Make sure that the process is correct and that it is activated.
Below are my screenshots of my critieria's, Any insight would be appreciated. I followed the precedence set by Velma that she had success with.
-
- Andrew Eversley
- August 04, 2015
- Like
- 0
- Continue reading or reply
Controlling Access to Objects Challenge - Trailhead - Need Some Help!
The challenge requires a profile to be created with the following traits:
Name: Account Reviewer
Salesforce license type
Only read access to Account object. (And no access to any other object in the Org)
Understand that I did read the indepth reading before hand and I created a read-only clone profile in the Accounts profile list but am stuck as how to proceed from there. Challenge error states: Challenge not yet complete ... here's what's wrong: The 'Account Reviewer' profile does not work as expected. Please Advise.
-
- Andrew Eversley
- July 25, 2015
- Like
- 1
- Continue reading or reply
"Using Formula Fields" Trailhead Challenge error/issue Revisited
Hello All, I'm having an issue with the Using Formula Field Challenge . I'm using the formula that Vivek provided to a solved question yesterday " TODAY() - DATEVALUE(LastModifiedDate) " but its been met with this error below when its been checked by the challenge "
Challenge not yet complete... here's what's wrong:
The 'Days_Since_Last_Update__c' formula field did not return the correct number of days between an Account’s Last Activity Date and today
Can anyone assist???
-
- Andrew Eversley
- July 24, 2015
- Like
- 0
- Continue reading or reply
Displaying Records, Fields, and Tables - Visualforce Page - Trailhead Error
Need some assistance with and error on a VisualSource Page Trailhead Challenge
Here is the Criteria:
Create a page which displays a subset of Opportunity fields using apex:outputField components. Bind the Name, Amount, Close Date and Account Name fields to the apex:outputField components.The page must be named 'OppView'.
It must reference the Opportunity standard controller.
It must have an apex:outputField component bound to the Opportunity Name.
It must have an apex:outputField component bound to the Opportunity Amount.
It must have an apex:outputField component bound to the Opportunity Close Date.
It must have an apex:outputField component bound to the Account Name of the Opportunity.
Here is the error I'm receiving
Challenge not yet complete... here's what's wrong:
The page does not include a apex:outputField component bound to the opportunity name
Here is my code for the page:
<apex:page standardController="Opportunity" >
<apex:pageBlock title="Opportunities">
<apex:pageBlockSection>
<apex:outputField value="{! Opportunity.Account.Name}"/>
<apex:outputField value="{! Opportunity.Amount }"/>
<apex:outputField value="{! Opportunity.CloseDate }"/>
<apex:outputField value="{! Opportunity.Accountid }"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
Please Advise Community!!
-
- Andrew Eversley
- August 22, 2015
- Like
- 1
- Continue reading or reply
Writing SOSL Queries - Trailhead Challenge Error
Hello, Community, I am facing problem in solving this challenge, please advise.
Here is the criteria presented:
With SOSL you can search against different object types that may have similar data, such as contacts and leads. To pass this challenge, create an Apex class that returns both contacts and leads that have first or last name matching the incoming parameter.
The Apex class must be called 'ContactAndLeadSearch' and be in the public scope.
The Apex class must have a public static method called 'searchContactsAndLeads'.
Because SOSL indexes data for searching, you must create a Contact record and Lead record before checking this challenge. Both records must have the last name 'Smith'. The challenge uses these records for the SOSL search.
The return type for 'searchContactsAndLeads' must be 'List<List< SObject>>'
The 'searchContactsAndLeads' method must accept an incoming string as a parameter, find any contact or lead that matches the string as part of either the first or last name and then return those records.
Error received:
Challenge not yet complete... here's what's wrong:
Executing the 'searchContactsAndLeads' method failed. Either the method does not exist, is not static, or does not return the expected search results.
Here is my code:
public class ContactAndLeadSearch{
public static List<List< SObject>> searchContactsAndLead(String name)
{
List<List<sObject>> result=[FIND :name IN ALL FIELDS RETURNING Lead(LastName),Contact(LastName)];
return result;
}
}
PLEASE ADVISE...Thanks Community!!!
-
- Andrew Eversley
- August 19, 2015
- Like
- 1
- Continue reading or reply
Controlling Access to Objects Challenge - Trailhead - Need Some Help!
The challenge requires a profile to be created with the following traits:
Name: Account Reviewer
Salesforce license type
Only read access to Account object. (And no access to any other object in the Org)
Understand that I did read the indepth reading before hand and I created a read-only clone profile in the Accounts profile list but am stuck as how to proceed from there. Challenge error states: Challenge not yet complete ... here's what's wrong: The 'Account Reviewer' profile does not work as expected. Please Advise.
-
- Andrew Eversley
- July 25, 2015
- Like
- 1
- Continue reading or reply
Trailhead Challenge: Write an Inline SOSL Search to Return Database Values
This is what I did using Execute Anonymous Window
List<List<sObject>> searchList = [FIND 'Mission Control' IN ALL FIELDS RETURNING Contact(FirstName, LastName, Phone, Email, Description)]; Contact[] searchContacts = (Contact[])searchList[0]; System.debug('Found the following contacts:'); for (Contact c : searchContacts) { System.debug('"'+c.LastName + ', ' + c.FirstName+'"'); }
But still there's an error when I check the challenge.
Challenge Not yet complete... here's what's wrong:
Could not find the contact's name in the debug log. Be sure to run a query for your record, and to write your contact's name to the debug log using the System.debug() method.
- Lantin Mary
- February 01, 2017
- Like
- 1
- Continue reading or reply
Modify the NewURLPolicyCondition Apex Class/Use Apex in Transaction Security Policies
I completed the previous challenges in this section with ease but don't see any reference to "in the past two days" so I am not sure how to modify the condition "to the past week".
Please help!
- Justin Deck
- July 06, 2016
- Like
- 0
- Continue reading or reply
Understanding Execution Context - Apex trigger Trailhead Issue.
I'm having an issue with this particular challenge below:
Write an Apex trigger that fires before records are inserted and ensures that the ShippingState field has the same value as the BillingState field.
Create an Apex class named AccountTriggerHandler that contains a public static method called CreateAccounts to accept the List of Account objects.
For each Account record, before saving, ensure that the ShippingState field has the same value as the BillingState field.
Write an Apex trigger named AccountTrigger that fires before records are inserted.
The Apex trigger must call the AccountTriggerHandler.CreateAccounts() method with the collection of new records.
Create a test class named AccountTriggerTest that inserts 200 Account records with a BillingState of CA. After the insert, test to ensure that all 200 records have a ShippingState of CA.
Before verifying this challenge, run your test class at least once using the Developer Console Run All feature.
This is my Challenge Error:
Challenge Not yet complete... here's what's wrong:
The Trigger 'AccountTrigger' does not appear to be calling the AccountTriggerHandler class correctly or using isBefore or isInsert content variables.
These are my codings below :
AccountTriggerHandler
AccountTrigger - Trigger On Account Object
AccountTriggerTest
P.S. I'm pretty new to the developing with Apex so I'm learning and growing so the help is appreciated community.
- Andrew Eversley
- March 28, 2016
- Like
- 0
- Continue reading or reply
Creating an Apex class that return Account objects challenge?
public class AccountUtils {
public static void accountsByState(String st){
List<String> accts = [SELECT Id, Name FROM Account WHERE billingState = :st];
}
}
I believe the first part is correct, but I cannot seem to get a return value. I am confused by the constructors. I have tried the documentation but I can't get a return value. Please help. I need to get this challenge complete.
- Susan Thomlinson
- March 18, 2016
- Like
- 3
- Continue reading or reply
Creating the AccountLocator Component Trailhead Project Issue
I'm currently working on the "Build an Account Geolocation App" project in the Trailhead Project section. I'm having an issue on "Step 2: Use the AccountLocator Component in a Lightning Application"
My issue is this:
The Steps:
1.In the Developer Console, select File > New > Lightning Application.
2.Specify AccountLocatorApp as the bundle name, and click Submit.
3.On the AccountLocatorApp.cmp tab, implement the application as follows:
After I go to step 2 and submit the AccountLocatorApp name it gives me an error stating:
"duplicate value found: <unknown> duplicates value on record with id: <unknown>"
Then this error:
Operation did not complete "Long running operation did not complete, continuing in background"
I would like some assistance or insight into this issue community. Thanks.
- Andrew Eversley
- March 17, 2016
- Like
- 0
- Continue reading or reply
Write an Apex trigger that modifies Account fields before inserting records.
I have a problem with this challenge :
Write an Apex trigger that fires before records are inserted and ensures that the ShippingState field has the same value as the BillingState field.
Create an Apex class named AccountTriggerHandler that contains a public static method called CreateAccounts to accept the List of Account objects.
For each Account record, before saving, ensure that the ShippingState field has the same value as the BillingState field.
Write an Apex trigger named AccountTrigger that fires before records are inserted.
The Apex trigger must call the AccountTriggerHandler.CreateAccounts() method with the collection of new records.
Create a test class named AccountTriggerTest that inserts 200 Account records with a BillingState of CA. After the insert, test to ensure that all 200 records have a ShippingState of CA.
Before verifying this challenge, run your test class at least once using the Developer Console Run All feature.
and this is my classes :
public class AccountTriggerHandler { public static void CreateAccounts(List<Account> acclist){ for(Account a:acclist){ if(a.ShippingState!=a.BillingState){ a.BillingState=a.ShippingState; } } } }
trigger AccountTrigger on Account (before insert) { if (Trigger.isBefore && Trigger.isInsert) { AccountTriggerHandler.CreateAccounts(Trigger.new); } }
@isTest public class AccountTriggerTest { @isTest static void TestCreate200Records(){ // Test Setup data // Create 200 new Accounts List<Account> accts = new List<Account>(); for(Integer i=0; i < 200; i++) { Account acct = new Account(Name='Test Account ' + i, BillingState = 'CA'); accts.add(acct); Test.startTest(); //insert acct; Test.stopTest(); for (Account a:accts){ System.assertEquals('CA', a.ShippingState, 'ERROR'); } } } }And this error :
Challenge Not yet complete... here's what's wrong:
The 'AccountTrigger' Trigger does not appear to be working correctly. Inserted records did not have matching BillingState and ShippingState values.
Anyone can help me please??
Thanks!
- Selim BEAUJOUR
- March 15, 2016
- Like
- 1
- Continue reading or reply
Challenge Not yet complete... here's what's wrong: The 'AccountTrigger' Trigger does not appear to be working correctly. Inserted records did not have matching BillingState and ShippingState values.
I have a problem with this Challenge : https://developer.salesforce.com/trailhead/microsoft_dotnet/apex_basics_dotnet/execution_context
//AccountTriggerHandler
public class AccountTriggerHandler {
public static void CreateAccounts(List<Account> acclist){
for(Account a:acclist){
if(a.ShippingState!=a.BillingState){
a.BillingState=a.ShippingState;
}
}
}
}
//AccountTrigger
trigger AccountTrigger on Account (before insert)
{
if (Trigger.isBefore && Trigger.isInsert) {
AccountTriggerHandler.CreateAccounts(Trigger.new);
}
}
//AccountTriggerTest
@isTest
public class AccountTriggerTest {
@isTest static void TestCreate200Records(){
// Test Setup data
// Create 200 new Accounts
List<Account> accts = new List<Account>();
for(Integer i=0; i < 200; i++) {
Account acct = new Account(Name='Test Account ' + i, BillingState = 'CA');
accts.add(acct);
Test.startTest();
insert acct;
Test.stopTest();
for (Account a:accts){
System.assertEquals('CA', a.ShippingState, 'ERROR');
}
}
}
}
Can you help me please??
Thanks!
- Selim BEAUJOUR
- March 14, 2016
- Like
- 0
- Continue reading or reply
Setting up Lightning Connect - Pb with API Trailhead Error
I'm working on the "Setting up Lightning Connect - Pb with API Trailhead Module and after submitting the Check Challenge I've received this error below:
"Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.ExternalObjectException: data.api.DataSourceException: This data is no longer available. The "Phone" table in the external data source is currently unavailable. Try again later or contact your administrator for help."
Has anyone come across this error, or have any ideas on what the issue is or on how to proceed to complete the challenge. Thanks.
- Andrew Eversley
- February 01, 2016
- Like
- 0
- Continue reading or reply
Quick Start: Heroku Connect Error
Step Not yet complete... here's what's wrong:
The 'Tim Barr' contact record was not updated correctly in Salesforce. Please check your Heroku Connect setup.
Note: you may run into errors if you've skipped previous steps.
Please advise. Thanks!
- Amy S. Oplinger
- January 11, 2016
- Like
- 1
- Continue reading or reply
Create a Lightning Component to display Case information
<aura:component controller="DisplayCaseController" implements="force:appHostable">
<aura:attribute name="record" type="Case[]"/>
<ui:inputNumber label="Case ID" aura:id="CaseID"/><br/><br/>
<ui:button label="Get Case" press="{ !c.getCaseFromId }"/><br/><br/>
<aura:iteration var="c" items="{!v.record}">
<p>{!c.Subject} : {!c.Description} : {!c.Status}</p>
</aura:iteration>
</aura:component>
client-side controller:-
({
getCaseFromId : function(component) {
var caseID = component.find("CaseID").get("v.value");
var action = component.get("c.getCaseFromId");
action.setCallback(this, function(response){
var state = response.getState();
if (state === "SUCCESS") {
component.set("v.record", response.getReturnValue());
}
});
$A.enqueueAction(action);
}
})
public class DisplayCaseController {
@AuraEnabled
public static Case getCaseFromId(Id caseID) {
if(caseID == null) {
return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1];
}
List<Case> cases = [ SELECT Id, Subject, Description, Status from CASE where ID = :caseID ];
if(cases.size() == 0) {
return [SELECT ID, Subject, Description, STATUS from Case LIMIT 1];
} else {
return cases[0];
}
}
}
Challenge not yet complete... here's what's wrong:
The client side controller does not refer to the 'getCaseFromId' method of the Apex controller class
Thnaks In Advance
Prashant
- Prashant singh 16
- August 31, 2015
- Like
- 0
- Continue reading or reply
Error when checking 'Using Expressions' challenge
I am currently trying to complete the 'Using Expressions' challenge on the Trailhead Lightning site, and keep getting the same error.
Code
Component
<aura:component >
<aura:attribute name="IsSunday" type="Boolean" default="false"/>
<aura:attribute name="IsMonday" type="Boolean" default="false"/>
<aura:attribute name="IsTuesday" type="Boolean" default="false"/>
<aura:attribute name="IsWednesday" type="Boolean" default="false"/>
<aura:attribute name="IsThursday" type="Boolean" default="false"/>
<aura:attribute name="IsFriday" type="Boolean" default="false"/>
<aura:attribute name="IsSaturday" type="Boolean" default="false"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:if isTrue="{!v.IsSunday}">
<p>Today is Sunday</p>
</aura:if>
<aura:if isTrue="{!v.IsMonday}">
<p>Today is Monday</p>
</aura:if>
<aura:if isTrue="{!v.IsTuesday}">
<p>Today is Tuesday</p>
</aura:if>
<aura:if isTrue="{!v.IsWednesday}">
<p>Today is Wednesday</p>
</aura:if>
<aura:if isTrue="{!v.IsThursday}">
<p>Today is Thursday</p>
</aura:if>
<aura:if isTrue="{!v.IsFriday}">
<p>Today is Friday</p>
</aura:if>
<aura:if isTrue="{!v.IsSaturday}">
<p>Today is Saturday</p>
</aura:if>
</aura:component>
CONTROLLER
({
doInit : function(component) {
var theDate = new Date();
if (theDate.getDay()==0) {component.set("v.IsSunday", true);}
if (theDate.getDay()==1) {component.set("v.IsMonday", true);}
if (theDate.getDay()==2) {component.set("v.IsTuesday", true);}
if (theDate.getDay()==3) {component.set("v.IsWednesday", true);}
if (theDate.getDay()==4) {component.set("v.IsThursday", true);}
if (theDate.getDay()==5) {component.set("v.IsFriday", true);}
if (theDate.getDay()==6) {component.set("v.IsSaturday", true);}
}
})
ERROR
Challenge not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: ZPWCUPZG
I tried creating a new Developer edition, as per a suggestion on another thread, but got the same error (albeit with a different error id).
I went back to my original developer edition and tried another suggestion - modifying the code in my component to have only one <aura:if> statement and one <aura:set attribute....> tag, as shown below:
<aura:component >
<aura:attribute name="IsSunday" type="Boolean" default="false"/>
<aura:attribute name="IsMonday" type="Boolean" default="false"/>
<aura:attribute name="IsTuesday" type="Boolean" default="false"/>
<aura:attribute name="IsWednesday" type="Boolean" default="false"/>
<aura:attribute name="IsThursday" type="Boolean" default="false"/>
<aura:attribute name="IsFriday" type="Boolean" default="false"/>
<aura:attribute name="IsSaturday" type="Boolean" default="false"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:if isTrue="{!v.IsSunday}">
<p>Today is Sunday</p>
<aura:set attribute="else">
Today is not Sunday
</aura:set>
</aura:if>
<!-- Commented out code -->
<!-- <aura:if isTrue="{!v.IsMonday}">
<p>Today is Monday</p>
</aura:if>
<aura:if isTrue="{!v.IsTuesday}">
<p>Today is Tuesday</p>
</aura:if>
<aura:if isTrue="{!v.IsWednesday}">
<p>Today is Wednesday</p>
</aura:if>
<aura:if isTrue="{!v.IsThursday}">
<p>Today is Thursday</p>
</aura:if>
<aura:if isTrue="{!v.IsFriday}">
<p>Today is Friday</p>
</aura:if>
<aura:if isTrue="{!v.IsSaturday}">
<p>Today is Saturday</p>
</aura:if> -->
<!-- Commented out code -->
</aura:component>
Same end result:
Challenge not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: MEEOAPTN
Any help would be appreciated. have spent quite a lot of time on this already!
- Alastair Scollay 8
- August 05, 2015
- Like
- 0
- Continue reading or reply
[Visualforce Mobile] Implementing Object-Specific Actions with Visualforce Pages
I can't manage to finish this challenge. I got this error :
" The 'ShowAssistantInfo' page isn't referencing the Assistant Name variable."
I used the <apex:variable> to create the variables but still got the error.
Here is my code :
<apex:page docType="html-5.0" standardController="Contact" title="Assistant Information"> <apex:variable var="AssistantName" value="{!Contact.Name}" /> <apex:variable var="AssistantPhone" value="{!Contact.Phone}" /> <p>Assistant : {!AssistantName}</p> <p>Phone : <a href="tel:{!AssistantPhone}">{!AssistantPhone}</a></p> </apex:page>
Thanks
- Vijay DOMINIC
- March 17, 2015
- Like
- 2
- Continue reading or reply
Setting up indirect relationship between standard and external object
I'm following a well written tutorial written by @andymahood__c: http://www.tquila.com/blog/2014/11/17/setting-lightning-connect-and-your-first-external-object
When I get to the step #3 ... "Select Edit on the CustomerID field, ...", I don't see Account (or any objects to relate) listed in the drop down box. I have created the custom field on ACCOUNT named CusotmerID Text(5) and marked it as External ID as follows:
CustomerID CustomerID__c Text(5) (External ID) [Checked]
Any ideas?
- Sumit Sarkar 2
- February 15, 2015
- Like
- 2
- Continue reading or reply