• Bill Kratochvil
  • 55 Points
  • Member since 2016
  • Architect/Senior developer MCAD.NET C#
  • Global Webnet, LLC

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 5
After reading the content in the Trailhead unit noted in title I was surprised that my last choice (due to process of elimination) to question 2 was the correct choice - the answer was "B - Only the subscriber can edit the fields"???  Everything I was reading suggested (particularly the chart) indicates that only the package developer can edit the fields.

Is this an error or did I miss some important content?   Are subscribers allowed to edit fields for protected records if they are designated upgradeable?

2. Both fields on the VAT Data type are upgradable. If your records are protected, who can edit these fields after they’re uploaded and installed in an unmanaged package?
  A Only the package developer can edit the fields.
  B Only the subscriber can edit the fields.
  C Both the developer and the subscriber can edit the fields.
  D Nobody can edit the fields because–they’re locked after release.

Supporting excerpts follow...

Putting it all together
In a managed package, the package developer can always edit upgradeable fields. Subscribers can edit subscriber editable fields on public records but not on protected ones. In fact, subscriber editable fields on protected records are essentially locked after release.

Protecting Custom Metadata Records
Instead of protecting the entire metadata type, you can leave the type public and protect individual records. A protected record is only accessible to code in the same namespace as the record or its associated custom metadata type. But because the type is public, a subscriber org or extension package can add its own records to that type.

Field Manageability
Upgradeable—The package developer can edit the field after release via package upgrades. Subscriber orgs can’t change the field.
Hi, I am having trouble with the "Attributes and Expressions" module from trailhead.

Here is the challenge:
Create a Lightning Component to display a single item for your packing list.
  • Create a component called campingListItem that displays the name (ui:outputText) and the three custom fields using the appropriate output components.
  • Add an attribute named 'item' for type Camping_Item__c.
I created an component named campingListItem and this is the code:
<aura:component >
    <aura:attribute name="item" type="<my_domain>__Camping_Item__c"/>
    <ui:outputText value="{!v.item.Name}"/>
    <ui:outputCheckbox value="{!v.item.<my_domain>__Packed__c}"/>
    <ui:outputCurrency  value="{!v.item.<my_domain>__Price__c}"/>
    <ui:outputNumber value="{!v.item.<my_domain>__Quantity__c}"/>

The error that I am getting is: "Challenge Not yet complete... here's what's wrong: 
The packingListItem Lightning Component's attribute tag doesn't exist or its attributes are not set correctly."

With this, I tried to create another component, with the name "packingListItem", but It didn't work.

Can anyone help me?


I have written a test class for this rest callouts but its not covering 100% code coverage. Can someone please help me

It throws me error when I run the test class 
Class.AnimalLocator.getAnimalNameById: line 16, column 1 Class.AnimalLocatorTest.testcallout: line 7, column 1

Apex class 

public class AnimalLocator {

public static string getAnimalNameById (integer i)
    string a;
    Http ht = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals/' + i);
        HttpResponse response = ht.send(request);
        // If the request is successful, parse the JSON response.
    if (response.getStatusCode() == 200) 
            Map<String, Object> result = (Map<String, Object>)JSON.deserializeUntyped(response.getBody());
             Map<string,object> cc = (Map<string,object>) result.get('animals');
        a = (string)cc.get('name');
    return a;

Test class

public class AnimalLocatorTest 
@isTest static void testcallout()
      Test.setMock(HttpCalloutMock.class, new AnimalLocatorMock()); 
    string response = AnimalLocator.getAnimalNameById (2); 
String expectedValue = '{"animal":{"id":2,"name":"bear","eats","berries, campers, adam seligman","says":"yum yum"}}'; 
system.assertEquals('eats', response);

global class AnimalLocatorMock implements HttpCalloutMock 
global HTTPResponse respond(HTTPRequest request) 
        // Create a fake response
         HttpResponse response = new HttpResponse(); 
     response.setHeader('Content-Type', 'application/json');
    response.setBody('{"animal":{"i":2,"name":"bear","eats":"berries, campers, adam seligman","says":"yum yum"}}'); 
        return response;
  • January 29, 2016
  • Like
  • 0
The instructions state:

"The method must return the ID and Name for the requested record and all associated contacts with their ID and Name."

I am returning a List<sObject> where the first object is the Account and the remaining objects are the Contacts.

The error message is:

"Executing the 'AccountManager' method failed. Either the service isn't configured with the correct urlMapping, is not global, does not have the proper method name or does not return the requested account and all of its contacts."

I assume it is looking for a different structure to be returned by getAccount() besides List<sObject> but since Account doesn't have a field to store associated Contacts, I'm not sure what to return.

Anyone able to clarify for me what type & structure the return value should have?
When i check challenge, i have this error message : "Challenge not yet complete... here's what's wrong: An external object with the API name Phone_Plan__x does not exist "
In fact, my API name is like that "XXX_Phone_Plan__x" where XXX is my Namespace Prefix.
How can i correct the API name ?
Project custom object records should only be seen by the owner of the record and users above the owner on the role hierarchy. However, for some Project records, the Training Coordinator must also have Read Only visibility to the Project record.

Create a custom picklist field on the Project object called “Priority” with the following values: High, Medium, and Low. Then create a criteria-based Sharing Rule for Project records where the Priority = High to share those records with the Training Coordinator role.