• Jhonny Alexander Ramirez Chiroque
  • NEWBIE
  • 5 Points
  • Member since 2020


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 7
    Replies
I would like to enable the New (+) menu, and that the buttons are enabled, without the need to enter the personal or corporate folder

could you help meUser-added image
When I'm trying to use 
> sfdx force:auth:web:login -d -a DevHub
Getting Error - 
ERROR running force:auth:web:login:  Cannot start the OAuth redirect server on port PortInUseAction. 

Try this: 
Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.

 
Somehow I was not able to complete this challenge due to above error:
 
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId">

    <aura:attribute name="accountRecord" type="Account"/>
    <aura:attribute name="record" type="Object"/>
    <aura:attribute name="recordSaveError" type="String" default=""/>

    <force:recordData aura:id="recordHandler"
    recordId="{!v.recordId}"
    layoutType="FULL"
    targetRecord="{!v.record}"
    targetFields="{!v.accountRecord}"
    targetError="{!v.recordSaveError}"
    mode="EDIT"
    fields="Name"/>
    
    <!-- Display an editing form -->
    <div class="Record Details">
        <lightning:card iconName="action:edit" title="Edit Account">
            <div class="slds-p-horizontal--small">
                <lightning:input  label="Account Name" value="{!v.accountRecord.Name}"  name="Account Name"  />
                <br/>
                <lightning:button label="Save Account" onclick="{!c.handleSaveRecord}" class="slds-m-top--medium"/>
            </div>
        </lightning:card>
    </div>
        
    <!-- Display error message -->
    <aura:if isTrue="{!not(empty(v.recordSaveError))}">
        Error: <ui:outputText value="{!v.recordSaveError}"/>
    </aura:if>
 
 </aura:component>
 
({
    handleSaveRecord : function(component, event, helper) {
        component.find("recordHandler").saveRecord($A.getCallback(function(saveResult) {
            if (saveResult.state === "SUCCESS" || saveResult.state === "DRAFT") {
                // handle component related logic in event handler
                component.set("v.recordSaveError", "");
                                
            } else if (saveResult.state === "INCOMPLETE") {
                console.log("User is offline, device doesn't support drafts.");
            } else if (saveResult.state === "ERROR") {
                console.log('Problem saving record, error: ' + JSON.stringify(saveResult.error));
                var errMsg = "";
                // saveResult.error is an array of errors, 
                // so collect all errors into one message
                for (var i = 0; i < saveResult.error.length; i++) {
                    errMsg += saveResult.error[i].message + "\n";
                }
                component.set("v.recordSaveError", errMsg);                
                
            } else {
                console.log('Unknown problem, state: ' + saveResult.state + ', error: ' + JSON.stringify(saveResult.error));
            } 
        })); 
    }
})

Please help, Thanks :) 
Hi,
    Eventhough my code works i still get the error "The page does not bind to the record ID value (in order to link to the record detail page) " when i tried to check in the challenge. any help is appreciated.
code below:
<apex:page standardController="Account" recordSetVar="accounts" >
   <apex:pageBlock title="Account List">
      <!-- accounts List -->
       <apex:repeat value="{! accounts }" var="a">
          <li>
            <apex:outputLink value="/{!LEFT(a.Id,15)}">/{!LEFT(a.Id,15)} </apex:outputLink>
          </li>
</apex:repeat>
</apex:pageBlock>
</apex:page>

Thanks
Greetings - has anyone received the error "No Apex class named 'ParkServiceMock' was found."? I have the ParkServiceMock class defined, and called out in the ParkLocatorTest class using Test.setMock(WebServiceMock.class, new ParkServiceMock());

I also verified that the tests run with 100% code coverage, and the ParkLocator class returns the names of parks. 

Any idea what I'm doing wrong?  Thanks in advance.  

Hi everyone,

i'm getting the following error after the system checks the challenge:

"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.QueryException: List has no rows for assignment to SObject"

I already tested it via Apex and via REST Explorer in Workbench, the code seems fine to me:

@restResource(urlMapping='/Account/*/contacts')
global class AccountManager {
	
    @httpGet
    global static Account getAccount(){
        RestRequest request = RestContext.request;
        String accountId = request.requestURI.substringBetween('/Account/' , '/contacts');
        
        Account result = [SELECT Id, Name, (SELECT Id,Name FROM Contacts) FROM Account WHERE Id = :accountId];
  
        return result;

    }
    
}


Can somebody help me with this?

Thank you,
Fabio

Hi All,

I am doing Apex Rest Callouts in Trailhead Apex Integration Service Module.
https://developer.salesforce.com/trailhead/force_com_dev_intermediate/apex_integration_services/apex_integration_rest_callouts

This is AnimalLocator class.
public class AnimalLocator{
    public static String getAnimalNameById(Integer x){
        Http h = new Http();
        HttpRequest req = new HttpRequest();
        
        req.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/' + x);
        
        req.setMethod('GET');
        
        HttpResponse res = h.send(req);
        Map<String, Object> results = (Map<String, Object>)JSON.deserializeUntyped(res.getBody());
        Map<String, Object> animal = (Map<String, Object>) results.get('animal');
        return (String)animal.get('name');
    }
}
However, I was encountered this error when checking challenge.
Challenge Not yet complete... here's what's wrong: 
The Apex class does not appear to be calling the REST endpoint using HttpRequest.
I have no idea what it means, but I have call the REST endpoint.
  • December 24, 2015
  • Like
  • 0
The challenge is:

You've been given a requirement to keep Contact addresses in sync with the Account they belong to. Use Process Builder to create a new process that updates all child Contact addresses when the address of the Account record is updated. This process:Can have any name.
Must be activated.
Must update Contact mailing address fields (Street, City, State, Post Code, Country) when the parent Account shipping address field values are updated.

I start with Accounts when records is created or edited.
Filter criteria where accounts shipping address (street, city, state, zip code) is changed (used "or" logic).

I am stuck on the next step "add action".  I started with action type "Update Records".
On objects, I can't seem to change Accounts to Contacts.  Why?