• ram sahu
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 6
    Replies
Hi All,

I have one doubt that how can i use includes with the set in soql query.

List<LD_Category_Group_Association__c> allLdCatGrpAsslist = [SELECT Id,User_Groups__c FROM LD_Category_Group_Association__c Where User_Groups__c includes (: set_of_LD_User_Groups) ];

Here , User_Groups__c  is a multiple picklist field
Hi All,

Please guide me in writting Test code for below code:

Code :

global class userSignoutScheduler implements Schedulable {
    //List<Business_Hours_Reference_Setup__mdt> businessHoursMDList = new List<Business_Hours_Reference_Setup__mdt>();
    List<String> timeZoneKeyList = new List<string>();
    global void execute(SchedulableContext SC) {
        List<User_Availability__c> userAvailList = new List<User_Availability__c>();
        for(Business_Hours_Reference_Setup__mdt bHRefList: [Select id, Business_Hours_Id__c, Timezone_Key__c from Business_Hours_Reference_Setup__mdt where Record_Type__c='User']){
            if(BusinessHours.isWithin(bHRefList.Business_Hours_Id__c, system.now())) {
                timeZoneKeyList.add(bHRefList.Timezone_Key__c);
            }
        }
        
        if(timeZoneKeyList.size()>0){
            for(User_Availability__c userAvailRec: [Select id, User__c, LD_Availability_User__c from User_Availability__c where LD_Availability_User__c=TRUE AND User__r.timezonesidkey in :timeZoneKeyList]){
                userAvailRec.LD_Availability_User__c=FALSE;
                userAvailList.add(userAvailRec);
            }
        }
        
        if(userAVailList.size()>0)
            update userAvailList;
    }    
    
}
I need to convert my trigger into isInsert and isUpdate.
Trigger :

trigger GenerateTimeZone on Lead (before insert,before update) {
    List<Timezone_Setup_Data__mdt> TimezoneSetupList = [SELECT State__c,TimeZone__c FROM Timezone_Setup_Data__mdt];
    if ( TimezoneSetupList != null && !TimezoneSetupList.isEmpty() ){
        Map<String, String> timeZoneMap = new Map<String, String>();
        for(Timezone_Setup_Data__mdt convertToMap : TimezoneSetupList){
            timeZoneMap.put(convertToMap.State__c,convertToMap.TimeZone__c);
        }
        for(Lead leadRec:Trigger.New){
            if(leadRec.Borrower_AddressState__c != NULL){
                if(timeZoneMap.containsKey(leadRec.Borrower_AddressState__c)){
                    leadRec.Lead_Timezone__c = timeZoneMap.get(leadRec.Borrower_AddressState__c);
                }
            }
            else if(leadRec.Property_State__c != NULL){
                if(timeZoneMap.containsKey(leadRec.Property_State__c)){
                    leadRec.Lead_Timezone__c = timeZoneMap.get(leadRec.Property_State__c);
                }
            }
            else{
                   leadRec.Lead_Timezone__c='PST';
            }
        }
    } 

}
I need to update the Timezone field of Lead object on the basis of State/ZipCode/Telephone Number on every lead creation. I already have list of Zipcodes/State/telephone no. along with their timezone in excel format.
Mapping will need to be created for all of the combinations and which time zone should be used. 
This mapping table will be used to look up lead time zone.
Hi All,

I have one doubt that how can i use includes with the set in soql query.

List<LD_Category_Group_Association__c> allLdCatGrpAsslist = [SELECT Id,User_Groups__c FROM LD_Category_Group_Association__c Where User_Groups__c includes (: set_of_LD_User_Groups) ];

Here , User_Groups__c  is a multiple picklist field
I need to convert my trigger into isInsert and isUpdate.
Trigger :

trigger GenerateTimeZone on Lead (before insert,before update) {
    List<Timezone_Setup_Data__mdt> TimezoneSetupList = [SELECT State__c,TimeZone__c FROM Timezone_Setup_Data__mdt];
    if ( TimezoneSetupList != null && !TimezoneSetupList.isEmpty() ){
        Map<String, String> timeZoneMap = new Map<String, String>();
        for(Timezone_Setup_Data__mdt convertToMap : TimezoneSetupList){
            timeZoneMap.put(convertToMap.State__c,convertToMap.TimeZone__c);
        }
        for(Lead leadRec:Trigger.New){
            if(leadRec.Borrower_AddressState__c != NULL){
                if(timeZoneMap.containsKey(leadRec.Borrower_AddressState__c)){
                    leadRec.Lead_Timezone__c = timeZoneMap.get(leadRec.Borrower_AddressState__c);
                }
            }
            else if(leadRec.Property_State__c != NULL){
                if(timeZoneMap.containsKey(leadRec.Property_State__c)){
                    leadRec.Lead_Timezone__c = timeZoneMap.get(leadRec.Property_State__c);
                }
            }
            else{
                   leadRec.Lead_Timezone__c='PST';
            }
        }
    } 

}
Hello,

I am currently running in to an issue on Step 6 of the Lightning Experience Rollout Specialist Superbadge.

When I click check challenge, this is the error I get:
Challenge Not yet complete... here's what's wrong: 
The All Lusso Scarpe Employee group page must display the following information on the right side of the page: recommended groups and individuals to follow, and the most popular topics currently under discussion.

Here is a screenshot of my page:
User-added image

Can anyone help me understand what I am doing wrong?

Thank you!
I'm having problems with the Check Challenge on step 6, with regards to the Chatter Group.

I have created the Chatter group and a lightning page to support it. I have been getting this error for the last hour:
User-added image

It's driving me nuts - I've tried everything, even renaming the page. It's quite clearly there.

User-added image

Salesforce is this a bug?