• Jiri Ulip
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello,

I'm working on getting the action handling challenge (https://developer.salesforce.com/trailhead/lex_dev_lc_basics/lex_dev_lc_basics_controllers) and although I believe my code is correct and does what it's expected to do (see below), I'm getting "Challenge Not yet complete... here's what's wrong: The campingListItem JavaScript controller isn't setting the 'item' attribute correctly." Could I get a hint on what's going on?

Cheers,

Jiri
({
    packItem : function(component, event, helper) {
   
       component.set("v.item.Packed__c", true);     
       event.getSource().set ("v.disabled", true);
        
    }
})

 
Hello,

I'm working on getting the action handling challenge (https://developer.salesforce.com/trailhead/lex_dev_lc_basics/lex_dev_lc_basics_controllers) and although I believe my code is correct and does what it's expected to do (see below), I'm getting "Challenge Not yet complete... here's what's wrong: The campingListItem JavaScript controller isn't setting the 'item' attribute correctly." Could I get a hint on what's going on?

Cheers,

Jiri
({
    packItem : function(component, event, helper) {
   
       component.set("v.item.Packed__c", true);     
       event.getSource().set ("v.disabled", true);
        
    }
})

 

In Sweden and some other parts of Europe the week numbering is often using the ISO 8601 standard that says that the first week of the year is the first week with at least 4 days in the new year. Some consequences of this is that the final dates of one year can be week 52, 53 or even week 1( in the following year). The same goes for the first dates of a year.

 

To be able to do weekly comparison report Year-to-Year with this weeknumbering it is necessary to create custom fields for the opportunity that calculates the Year and Week number for a given close date. Here is one solution using three custom formula fields.

 

Field: Global Sales Report Weekday

Description:  Day 1 = Sunday, 2 = Monday....., 7=Saturday

Formula:  MOD( CloseDate  - DATE(1900, 1, 7), 7)+1

 

Field: Global Sales Report Week Year

Formula: YEAR(CloseDate + (MOD(8- Global_Sales_Report_Weekday__c ,7)-3))

 

Field: Global Sales Report Week

Formula:

FLOOR((CloseDate - DATE( Global_Sales_Report_Week_Year__c ,1,1) +
MOD(
(MOD( DATE(Global_Sales_Report_Week_Year__c,1,1) - DATE(1900, 1, 7), 7)+1)
+1,7)-3) / 7 + 1)

 

Hope this can be of use for anyone else

 

Peter Baeza

InfoAction AB, Sweden

 

  • March 15, 2010
  • Like
  • 3