• Javier Peña Lucena
  • NEWBIE
  • 15 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 6
    Replies
Easy challenge, copying the code of CloudNewsTrigger and including small changes, but I have stucked with the UserId.

Using this code for OrderEventTrigger you will pass the course:
 
trigger OrderEventTrigger on Order_Event__e (after insert) {    
    // List to hold all tasks to be created.
    List<Task> tasks = new List<Task>();
    
    // Get queue Id for task owner
    //Group queue = [SELECT Id FROM Group WHERE Name='Regional Dispatch' LIMIT 1];
     String usr = UserInfo.getUserId();  
    // Iterate through each notification.
    for (Order_Event__e event : Trigger.New) {
        if (event.Has_Shipped__c == true) {
            // Create Task to dispatch new team.
            Task ts = new Task();
            ts.Priority = 'Medium';
            ts.Status = 'New';
            ts.Subject = 'Follow up on shipped order ' + event.Order_Number__c;
            ts.OwnerId = usr;//queue.Id;
            tasks.add(ts);
        }
   }
    
    // Insert all tasks corresponding to events received.
    insert tasks;

}

Good luck!
Easy challenge, copying the code of CloudNewsTrigger and including small changes, but I have stucked with the UserId.

Using this code for OrderEventTrigger you will pass the course:
 
trigger OrderEventTrigger on Order_Event__e (after insert) {    
    // List to hold all tasks to be created.
    List<Task> tasks = new List<Task>();
    
    // Get queue Id for task owner
    //Group queue = [SELECT Id FROM Group WHERE Name='Regional Dispatch' LIMIT 1];
     String usr = UserInfo.getUserId();  
    // Iterate through each notification.
    for (Order_Event__e event : Trigger.New) {
        if (event.Has_Shipped__c == true) {
            // Create Task to dispatch new team.
            Task ts = new Task();
            ts.Priority = 'Medium';
            ts.Status = 'New';
            ts.Subject = 'Follow up on shipped order ' + event.Order_Number__c;
            ts.OwnerId = usr;//queue.Id;
            tasks.add(ts);
        }
   }
    
    // Insert all tasks corresponding to events received.
    insert tasks;

}

Good luck!
I am working on the Salesforce1 Mobile Customization Badge and am in the module for the object specific quick actions. I have followed these steps:

Create a quick action on the event object for entering a prospective buyer's feedback
Your brokers want to capture the feedback of their potential buyers after they look at a property. Create a quick action on the event object so brokers can update an event with their notes immediately after a showing. Add the action to the publisher for the Showing layout.
Create a quick action for the event object
Action type: Update a Record
Label: Enter Feedback
Remove all the fields on the page layout except for Name
Put the Feedback field on the page layout
Add the Enter Feedback quick action to the publisher for the Showing Layout. You might have to override the predefined actions in the Salesforce1 section of the publisher.

And have this action done with layout streamlined:
User-added image

And the placement of the action:

User-added image

But I still get this error for Name and Feedback missing? 

User-added image

If anyone can help, that would be greatly appreciated. I am not sure what I am missing. 
1.Create a new event compact layout with the label: Showing Mobile Layout
2.Add the following fields to the compact layout in this order: Subject, Start, Property, Name.
3.Make the new compact layout the default for the Showing record type. (Hint: Do not change the primary compact layout for events. Enable the new 4.Showing compact layout in the Record Type Overrides section of the layout assignment editor.

For step 2. I don't have the option of the Property field and am unable to add it as a custom object to Event in the Schema Builder.
Also getting error id INDQUWUO
I wrote AccountsSelector class but I still can't pass the challange.
Where could I be wrong?
Code:

public with sharing class AccountsSelector extends fflib_SObjectSelector{
    
   public List<Schema.SObjectField> getSObjectFieldList() {
        return new List<Schema.SObjectField> {
            Account.Id,
            Account.Description,
            Account.Name,
            Account.AnnualRevenue };
    }
    
    List<Account> selectById(Set<ID> idSet) {
      return (List<Account>) selectSObjectsById(idSet);
    }

     public Schema.SObjectType getSObjectType() {
        return Account.sObjectType;
    }

}
 
I have done everything but I still get this error that is not helpful becauseI have done what it asks.

Challenge Not yet complete... here's what's wrong:
Either the contact object does not have a compact layout named 'Phone and Email', or it is not set as the primary compact layout
  1. I created a custom object 'Contact'
  2. I created custom fields of name (text), phone (phone type), mobile (phone type), and email (text type).
  3. Then I made a new custom compact layout called 'Phone and Email'
  4. I make 'Phone and Email' my primary compact layout
What did I do wrong?? Am I missing a step?? Please help.
I'm trying to setup a login / registration process in our sandboxes and am getting this error when signing up "Invalid field UserPreferencesHideS1BrowserUI" . Is this new and is there something in the documentation I am missing? 

In Management: Login and Registration
Community Builder Page: login
  • Allow Company username and password checked
  • Community Builder Page: Forgot Password
  • VF Page: Change Password
  • Allow external users to self-register: checked
  • Community Builder Page: Register
  • Profile (Self-Service User)
  • Account: (Generic account)
  • -- this avoids the Person accounts requirement.

User-added image
Challenge - Create a form to enter new items and display the list of items entered. To make our camping list look more appealing, change the campingHeader component to use the SLDS. Similar to the unit, style the Camping List H1 inside the slds-page-header. Modify the campingList component to contain an input form and an iteration of campingListItem components for displaying the items entered.
The component requires an attribute named items with the type of an array of camping item custom objects.
The component requires an attribute named newItem of type Camping_Item__c with default quantity and price values of 0.
The component displays the Name, Quantity, Price, and Packed form fields with the appropriate input component types and values from the newItem attribute.
The JavaScript controller checks to ensure that the Name, Quantity and Price values submitted are not null.
If the form is valid, the JavaScript controller pushes the newItem onto the array of existing items, triggers the notification that the items value provider has changed, and resets the newItem value provider with a blank sObjectType of Camping_Item__c.


My answer - 
<aura:component >
<aura:attribute name="items" type="Camping_Item__c[]"/>
<aura:attribute name="newitem" type="Camping_Item__c[]"  default="{ 'sobjectType': 'Camping_Item__c',
                   'Quantity__c'=0, 'Price__c'=0}"/>
 <p>Name:
        <ui:inputText value="{!v.newitem.name}"/>
    </p>    
  <p>Packed:
        <ui:inputCheckbox value="{!v.newitem.Packed__c}"/>
     
    </p>    
  <p>Price:
        <ui:inputCurrency value="{!v.newitem.Price__c}"/>
    </p>
    <p>Quantity:
        <ui:inputNumber value="{!v.newitem.Quantity__c}"/>
    </p>
</aura:component>


Error -

Challenge Not yet complete... here's what's wrong: 
The campingList component isn't iterating the array of 'items' and creating 'campingListItem' components.

Please share the correct solution.
I'm trying to setup a login / registration process in our sandboxes and am getting this error when signing up "Invalid field UserPreferencesHideS1BrowserUI" . Is this new and is there something in the documentation I am missing? 

In Management: Login and Registration
Community Builder Page: login
  • Allow Company username and password checked
  • Community Builder Page: Forgot Password
  • VF Page: Change Password
  • Allow external users to self-register: checked
  • Community Builder Page: Register
  • Profile (Self-Service User)
  • Account: (Generic account)
  • -- this avoids the Person accounts requirement.

User-added image