• Bill Dodson
  • NEWBIE
  • 170 Points
  • Member since 2014

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 28
    Replies
I'm trying to complete the trail module named in the subject, but I'm getting an error of:
Challenge Not yet complete... here's what's wrong: 
Couldn't find newField.behavior set to 'Metadata.UiBehavior.Edit', or newField.field set to 'AMAPI__Apex_MD_API_Twitter_name__c' or method doesn't return 'layoutMetadata'. Please double-check the instructions

Everything looks right to me in the class.  I can't use the namespace they provide because it's already taken.   Earlier in the exercise, it tells you to use your own namespace which I've done.  Can anyone see what's wrong?
 
public class UpdateContactPageLayout {
    // Add custom field to page layout
    
    public Metadata.Layout addLayoutItem () {
        
        // Retrieve Contact layout and section 
        List<Metadata.Metadata> layoutsList = 
            Metadata.Operations.retrieve(Metadata.MetadataType.Layout, 
            new List<String> {'Contact-Contact Layout'});
        Metadata.Layout layoutMetadata = (Metadata.Layout) layoutsList.get(0);
        Metadata.LayoutSection contactLayoutSection = null;
        List<Metadata.LayoutSection> layoutSections = layoutMetadata.layoutSections;
        for (Metadata.LayoutSection section : layoutSections) {
            
            if (System.equals(section.label, 'Additional Information')) {
                contactLayoutSection = section;
                break;
            }
        }
        
        // Add the field under Contact info section in the left column
        List<Metadata.LayoutColumn> contactColumns = contactLayoutSection.layoutColumns;     
        List<Metadata.LayoutItem> contactLayoutItems = contactColumns.get(0).layoutItems;
        
        // Create a new layout item for the custom field
        Metadata.LayoutItem newField = new Metadata.LayoutItem();
        newField.behavior = Metadata.UiBehavior.Edit;
        newField.field = 'BOBN_TRAILHEAD__Apex_MD_API_Twitter_name__c';
        contactLayoutItems.add(newField);
        
        return layoutMetadata;
    }
}

 
Hello everyone,
I cannot get actionSupport to actuate 'DoSomething' on iPad, neither on Android.  What am I missing? Thanks in advance, Jerome

<apex:selectList value="{!cou}" multiselect="false" size="1" >
<apex:selectOptions value="{!couSOList}" />
<apex:actionSupport event="onclick" action="{!doSomething}" reRender="aopNul"  />
</apex:selectList>
Hello,

When I create a Professional Edition scratch org without specifying the API feature it gets created with API enabled by default.  Is there any way to create a Professional Edition org without API enabled?  I am trying to test a managed package that passed security review and I want to insure API access works in PE orgs without the API feature.  Any help greatly appreciated.  Thanks.
Hello,

When I create a Professional Edition scratch org without specifying the API feature it gets created with API enabled by default.  Is there any way to create a Professional Edition org without API enabled?  I am trying to test a managed package that passed security review and I want to insure API access works in PE orgs without the API feature.  Any help greatly appreciated.  Thanks.
Hi I am doing the Assign Top Leads to Your Sales Rep Trailhead module >> https://trailhead.salesforce.com/trails/learn-admin-essentials/projects/prioritize-leads-with-einstein-lead-scoring/steps/assign-top-leads-to-your-sales-rep and when clicking on the Verify Step button at the bottom of the page I get an error
Step not yet complete... here's what's wrong:
We can't find criteria and immediate actions for Einstein Scores greater than or equal to 80.


This error message is not accurate as the steps in the process builder are there, however, I suspect the error is actually due to an email that I receive immediately after pressing the Verify Step button, I have copied and pasted the contents of the email below, any advice/help would be appreciated.

Subject: Developer script exception from Honeydew : 'LeadScoreGenerator' for job id '7071t000000V3oh' : Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu16.salesforce.com/services/data/v43.0/composite/tree/ScoreIntelligence

ApexApplication <info@jp.salesforce.com>12:03 (9 minutes ago)
to me
Apex script unhandled exception by user/organization: 0051t000000MOhX/00D1t000000DWM6

Failed to invoke future method 'public static void createScoreAndFactors(List<Id>)' on class 'LeadScoreGenerator' for job id '7071t000000V3oh'

caused by: System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu16.salesforce.com/services/data/v43.0/composite/tree/ScoreIntelligence

Class.LeadScoreGenerator.sendRequest: line 130, column 1
Class.LeadScoreGenerator.createScoreAndFactors: line 108, column 1
We've found that while you can have an sObject collection attribute on a lightning component that implements the lightning:availableForFlowScreens interface and access the attribute from the flow designer,  you cannot see the attribute if the component was created in a developer org that has a package prefix.

Example: We created the following sample component in both a clean developer org, and an org that had a package prefix defined:
 
<aura:component implements="lightning:availableForFlowScreens" access="global">
    <aura:attribute name="contacts" type="Contact[]" />
    <aura:iteration items="{!v.contacts}" var="contact">
        {!contact.Name}: {!contact.Email}<br/>
    </aura:iteration>
</aura:component>

And configured the design attributes so that the flow designer would be able to "see" the component attribute:
<design:component >
    <design:attribute name="contacts" label="Contact records"/>
</design:component>



The flow designer in package org refused to display the "Contact records" attribute:
(we also published the component as part of the package and tested it in the flow designer of the target org and got the same results).

User-added image 

However if we use the same source code to create a component in a non-packaging org, the component (without a namespace prefix) works fine and we can see the component attribute in the flow screen inputs and outputs:

User-added image

Has anyone else run into this?
I'm trying to complete the trail module named in the subject, but I'm getting an error of:
Challenge Not yet complete... here's what's wrong: 
Couldn't find newField.behavior set to 'Metadata.UiBehavior.Edit', or newField.field set to 'AMAPI__Apex_MD_API_Twitter_name__c' or method doesn't return 'layoutMetadata'. Please double-check the instructions

Everything looks right to me in the class.  I can't use the namespace they provide because it's already taken.   Earlier in the exercise, it tells you to use your own namespace which I've done.  Can anyone see what's wrong?
 
public class UpdateContactPageLayout {
    // Add custom field to page layout
    
    public Metadata.Layout addLayoutItem () {
        
        // Retrieve Contact layout and section 
        List<Metadata.Metadata> layoutsList = 
            Metadata.Operations.retrieve(Metadata.MetadataType.Layout, 
            new List<String> {'Contact-Contact Layout'});
        Metadata.Layout layoutMetadata = (Metadata.Layout) layoutsList.get(0);
        Metadata.LayoutSection contactLayoutSection = null;
        List<Metadata.LayoutSection> layoutSections = layoutMetadata.layoutSections;
        for (Metadata.LayoutSection section : layoutSections) {
            
            if (System.equals(section.label, 'Additional Information')) {
                contactLayoutSection = section;
                break;
            }
        }
        
        // Add the field under Contact info section in the left column
        List<Metadata.LayoutColumn> contactColumns = contactLayoutSection.layoutColumns;     
        List<Metadata.LayoutItem> contactLayoutItems = contactColumns.get(0).layoutItems;
        
        // Create a new layout item for the custom field
        Metadata.LayoutItem newField = new Metadata.LayoutItem();
        newField.behavior = Metadata.UiBehavior.Edit;
        newField.field = 'BOBN_TRAILHEAD__Apex_MD_API_Twitter_name__c';
        contactLayoutItems.add(newField);
        
        return layoutMetadata;
    }
}

 
Hello there,

I'm currently having a styling issue at the the step 3 of the Trailhead Lightning Component Framework Specialist,

here is what it's currently looks like :

User-added image

and what it is supposed to look :

User-added image

This is the BoatTile component code :
 
<aura:component >

    <aura:attribute name="boat" type="Boat__c" />
    <aura:attribute name="selected" type="Boolean" default="false" />
    
    <aura:registerEvent name="BoatSelect" type="c:BoatSelect"/>
    <aura:registerEvent name="BoatSelected" type="c:BoatSelected"/>

        <lightning:button class="{! v.selected == true ? 'tile selected' : 'tile' }" onclick="{!c.onBoatClick}">
            <div style="{!'background-image:url(\'' + v.boat.Picture__c + '\')'}" class="innertile">
                <div class="lower-third">
                    <h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>
                </div>
            </div>
        </lightning:button>

</aura:component>

and the associated style :
 
.THIS.tile {
    position:relative;
    display: inline-block;
    width: 100%;
    height: 220px;
    padding: 1px !important;
}

.THIS.innertile {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
}

.THIS.lower-third {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #FFFFFF;
    background-color: rgba(0, 0, 0, .4);
    padding: 6px 8px;
}

.THIS.selected {
    border: 3px solid rgb(0, 112, 210);
}

Any help would be great, I am a bit confused not to have this displayed correctly.

Thanks lot ! 
Hello.
The "View Source" button in Trailhead does not work in Chrome. It works in IE. Am I doing something wrong? 

User-added image

 
I am now trying to finish the challenge in module - Quick Start: Einstein Prediction Builder: Create a Formula Field to Predict.
https://trailhead.salesforce.com/projects/prediction_builder/steps/prediction_builder_formula_field?trailmix_creator_id=00550000006yDdKAAU&trailmix_id=admin-keynote-dreamforce-2017

I've created the Einstein Prediction Builder trailhead playground but could not find the custom object: Candidate.

Please advise. thanks.
Hi all, hope you may be able to help. :-) I am getting this message on trailhead: Challenge Not yet complete... here's what's wrong: Could not find a CORS whitelist entry for the chat window. When I go to CORS and try to save the whitelist entry, it does not allow me to save... Hence the issue. Please help. Thanks, Michal
I keep getting the following error:
Challenge Not yet complete... here's what's wrong:
Could not find 'Jane Cando' as a territory member of a service territory named 'San Francisco Area'.
However, when you look at the Territory related list you see the following:
User-added image
Jane Candor is in the correct territory.

 
Hello everyone,
I cannot get actionSupport to actuate 'DoSomething' on iPad, neither on Android.  What am I missing? Thanks in advance, Jerome

<apex:selectList value="{!cou}" multiselect="false" size="1" >
<apex:selectOptions value="{!couSOList}" />
<apex:actionSupport event="onclick" action="{!doSomething}" reRender="aopNul"  />
</apex:selectList>
I don't see a Setup menu to run the Lightning App Builder for a challange.  I'm using the Summer `15 Developer Edition.  How is it enabled?