• bobnunny1
  • NEWBIE
  • 65 Points
  • Member since 2010


  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 44
    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;
    }
}

 
I am trying this new Trail and receiving errors trying to install the package.  I created a brand new playground for it, and then clicked the link.  It told me:
This app can't be upgraded.
There are problems that prevent this package from being installed.
Unable to install.The unmanaged package "Trailhead Project" is already installed in your organization. You will need to uninstall it before installing a new version.

Trailhead Project is automatically created in a new playground, but the instruction makes it seem as if it's trying to install the DreamHouse app.  Could this be an incorrect Link?
Trying this Trailhead exercise, but when I try to create the FORCEDROID, after answering the prompts, I get the below error after "Saving android@~6.1.2 into config.xml file".  Any ideas?

forcedroid failed

Command failed: cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.1.0 --force
Error: Failed to fetch plugin https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.1.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963228 Error output:
npm ERR! addLocal Could not install C:\Users\robertn\AppData\Local\Temp\npm-7184-bd5e8d4a\git-cache-83631921\24a997d4581941c692b26ba
e755b2c5360fff306
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "https
://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.1.0" "--save"
npm ERR! node v6.10.3
npm ERR! npm  v3.10.10
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\robertn\TrailheadHybridApps\node_modules\npm-debug.log
I'm trying the challend for "Service Cloud Macros - Create and Run Macros".  But when I go to create the Macro, the macro instructions are empty.  I have a feedbased layout for Case and multiple quick actions associated, but no instructions.  What am I missing?
The last 3 challenges I've completed, Trailhead isn't showing the link to Linked In any longer.  Wonder if this is intentional and not supported now.
I'm on this module and it wants me to click "build and run".  But there is no Build & Run on the screen.  In addition, the left panel described doesn't show, so it doesn't give me the URL in the top line.  Is this a new version and the data is elsewhere?  I've clicked everything on the screen trying to get it.
Attempting this badge, I am clicking the paperclip to create a new Case and there is no option for Case.  Just Maintenance Request, Lead, Account, and Contact.  I refollowed all previous steps and can't see anyplace where we have to associate Case to this.  Can anyone help?
I'm getting the below error on step 6 of the Lightning Experience.  Has anyone else received this?  It's coming from when they are trying to delete their own contact that they created, but can't because of:

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: Delete failed. First exception on row 0 with id 0035000002glBWHAA2; first error: DELETE_FAILED, Your attempt to delete Sam the ninja could not be completed because it is associated with the following adventure packages.: null, null : []
All, I'm receiving the below error when trying this challenge.
The 'Sales Manager' dashboard does not have the correct headers and titles for the chart components.

I've tried many things including changing the base field for the Summary to the OOB fields, but it doesn't help.  My configurations are shown below and seem to match the requirements as exactly as I can find.  Does anyone else have any suggestions?  Can't find a Salesforce help for the Superbadges.

User-added image
Performing the first Challenge of this Superbadge for APEX, I am receiving the below error. But it is not true because the Maintenance Request does indeed have all of the attributes cited when I try via the GUI and via a Test Class. Can someone please tell me what is wrong?

Challenge Not yet complete... here's what's wrong:
Inserting a new Maintenance Request of type 'Routine Maintenance' and then closing it did not create of a new Maintenance Request based upon the original record correctly. The challenge is expecting to find the closed Maintenance Request plus an 'New' Maintenance Request of type 'Routine Maintenance' with the same Vehicle as the closed one.

(Also, the challenge didn't specifically mention that the Case and Product2 objects should be relabeled)
I am using Trailhead "Getting Started with Entitlements" and cannot find Entitlement Management in my Quick Search of Setup.  I have it in my regular Salesforce Org, but not my Developer Edition Org.  Do I need to open a ticket to get this?
Installed Node.js and then tried the install for Cordova and I'm receiving:
npm ERR! notsup Not compatible with your operating system or architecture: force ios@4.1.1

I tried installing both versions, but still receive this error.  Does anyone have any ideas?
The Packaging an ISV App challenge specifies that you need a Partner Developer Edition to complete it.  However, if you don't have one, it tells you to go back to Creating and Managing ISV Development Orgs to create one.  However, I can't find on that module where it tells you to how to get a PARTNER Developer org.  I created a fresh org as it suggested to create the My Domain, but don't see anything for the Enviroment Hub. 

Thanx!
When performing the Getting Started with Hybrid Development trail, I am receiving "You must set the ANDROID_HOME environment variable to the path of your installation of the Android SDK." when I try the "forcedroid create" command.  I can't find it after my install.  Does anyone know where it installs to?

Is there a way in my APEX Trigger to know that the update was fired from an API update rather than via the GUI or system itself?  Thanx!

Performing the first Challenge of this Superbadge for APEX, I am receiving the below error. But it is not true because the Maintenance Request does indeed have all of the attributes cited when I try via the GUI and via a Test Class. Can someone please tell me what is wrong?

Challenge Not yet complete... here's what's wrong:
Inserting a new Maintenance Request of type 'Routine Maintenance' and then closing it did not create of a new Maintenance Request based upon the original record correctly. The challenge is expecting to find the closed Maintenance Request plus an 'New' Maintenance Request of type 'Routine Maintenance' with the same Vehicle as the closed one.

(Also, the challenge didn't specifically mention that the Case and Product2 objects should be relabeled)
The Packaging an ISV App challenge specifies that you need a Partner Developer Edition to complete it.  However, if you don't have one, it tells you to go back to Creating and Managing ISV Development Orgs to create one.  However, I can't find on that module where it tells you to how to get a PARTNER Developer org.  I created a fresh org as it suggested to create the My Domain, but don't see anything for the Enviroment Hub. 

Thanx!
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;
    }
}

 
Get Started with the Salesforce Platform: While Install the DreamHouse App, Initialize Sample Data is not ended. I have tried two Create a Trailhead Playground. But it same result. not eneded. Any help?
Hi,

I am on wave trailhead "Add Key Metrics to Evaluate Your Business" , While I have done requisite for the trail I am getting below error 

"Could not find the correct dashboard state. Please verify the endpoint and results are correct." 
User-added image
Completed the challenge.  Added the notification (see attached image) in the Wave developer org.  It looks like it did not save the first time.  Added the notification a 2nd time, as shown in screen capture. User-added image
Hi All,
In the Data Integration Specialist Superbadge step 5 (Synchronize external PMS system project data with Salesforce), I still getting this error:

"Challenge Not yet complete... here's what's wrong: 
The 'ProjectRESTService' Apex REST service does not appear to be working properly. Calling the service either didn't update the opportunity correctly, return the string 'OK', create an associated project correctly or function correctly in general."


The problem is that my class is working properly and create an associated project and update its opportunity. Here it is:
 
@RestResource(urlMapping = '/project')
global class ProjectRESTService {

	@HttpPost
	global static String postProjectData() {

		SavePoint sp = Database.setSavepoint();
		try {
			system.debug('JSON: '+RestContext.request.requestBody.toString());
			Map<String, Object> mapOpp = (Map<String, Object>) JSON.deserializeUntyped(RestContext.request.requestBody.toString());

			system.debug('mapOpp: '+mapOpp);

			String oppId = (String) mapOpp.get('OpportunityId');

			String endDate = (String) mapOpp.get('EndDate');
			List<String> endDateLst = endDate.split('-');
			String startDate = (String) mapOpp.get('StartDate');
			List<String> startDateLst = startDate.split('-');

			Project__c pj = new Project__c();
			pj.Opportunity__c = oppId;
			pj.Billable_Amount__c = (Decimal) mapOpp.get('Amount');
			pj.End_Date__c = date.parse(endDateLst[2]+'/'+endDateLst[1]+'/'+endDateLst[0]);
			pj.Start_Date__c = date.parse(startDateLst[2]+'/'+startDateLst[1]+'/'+startDateLst[0]);
			pj.Name = (String) mapOpp.get('ProjectName');
			pj.ProjectRef__c = (String) mapOpp.get('ProjectRef');
			pj.Status__c = (String) mapOpp.get('Status');
			system.debug('Insert project: '+pj);
			insert pj;
			system.debug('Inserted'+pj);

			Opportunity opp = [SELECT Id, Name, Account.Name, CloseDate, Amount FROM Opportunity where Id = :oppId limit 1];
			opp.DeliveryInstallationStatus__c = 'In progress';
			opp.StageName = 'Submitted Project';
			system.debug('Insert Opportunity: '+opp);
			update opp;
			system.debug('Inserted: '+opp);

			system.debug('return OK');
			return 'OK';
		} catch (Exception e) {
			Database.rollback(sp);
			system.debug(e.getMessage());
			return e.getMessage();
		}
		/*
		return null;*/
	}

}

Has anyone had the same problem? Thank you.
URL: https://trailhead.salesforce.com/project/flow_reassign/flow_reassign_implement

Project: Build an Account Reassignment Wizard
Unit: Implement the Flow with Visualforce

As per the challenge, assigned 2 users with Salesforce license and third user with Salesforce Platform license. However with Salesforce Platform license the only available profile is Standard Platform User which gets applied. I believe that is also the reason I am unable to validate this challenge.
I'm on this module and it wants me to click "build and run".  But there is no Build & Run on the screen.  In addition, the left panel described doesn't show, so it doesn't give me the URL in the top line.  Is this a new version and the data is elsewhere?  I've clicked everything on the screen trying to get it.
I'm getting the below error on step 6 of the Lightning Experience.  Has anyone else received this?  It's coming from when they are trying to delete their own contact that they created, but can't because of:

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: Delete failed. First exception on row 0 with id 0035000002glBWHAA2; first error: DELETE_FAILED, Your attempt to delete Sam the ninja could not be completed because it is associated with the following adventure packages.: null, null : []
Bug in Lightning Specialist Superbadge step 6? - Automate fulfillment cancellation actions.   
 
The task is when fulfillment is Cancelled, the related OpportunityLineItem unitprice (i.e., salesprice) should be same as the Fulfillment's Deposit. Simple. I manually checked this and is working fine, but when the app checks, it fails with the error : System.AssertException: Assertion Failed: Same value.  
 
ISSUE: Now, if I see the debug logs (captured when Salesforce trailhead checks this).  In below snippet (from debug logs) see the last 2 lines.  There is assertEquals which checks deposit and unitprice - Match.  But assertNotEqual is also checking deposit and unitPrice.  It fails here.  Both the values will be same, the assertNotEqual is failing because both the values are same!
 
Execute Anonymous: // make sure the deposit matches the unit price
Execute Anonymous: System.assertEquals(f1.deposit__c, oli1.unitprice); // one way in the future
Execute Anonymous: System.assertNotEquals(f2.deposit__c, oli2.unitprice); // one way in the past

How to fix this? Is this a bug?
I am getting the following error:

The 'Sales Manager' dashboard does not have the correct headers and titles for the chart components.

Here is the screenshot of my dashboard

Dashboard
I am get this error: "Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type".

I believe i configured the report according to the instructions but it is still showing and error. Any assistance or insight would be apreciated. 
Has anyone completed this trail? I am stomped on challenge number 3, regarding created the process for fulfillment. Any pointers or guidance would be appreciated.
 
I seem to have no clue what's wrong in the report which I created. As per the requirement - Summarize the report by Account Name, the contact’s Full Name, and show the Hobby Name." Here I do not understand Full Name, as in the report we only get First Name, Last Name.
The error says - 
Challenge Not yet complete... here's what's wrong: 
The 'Lightning Hobbies by Contact' report does not appear to have either the correct report type or (most likely) the correct columns.

I have summarized the report by Account Name, then by Last Name. Another column shown is Hobbies Name. The report filter is on Hobby Type (the bucket field) = Outdoor Activities and it is locked.

Does anyone know whats wrong?