+ Start a Discussion
Best Answer chosen by ashish jadhav 9
Amit Chaudhary 8Amit Chaudhary 8
What is a Record Type?

Allows you to define different sets of picklist values for both standard and custom picklists
Record Types help you implement your custom business processes

Why use Record Types?
To segment picklist values specific to business needs
Examples: segment by division, product line, or region
Easier administration – fewer fields to maintain

Business Process

What is a Business Process?
•Allows you to track separate sales, support, and lead lifecycles across different divisions, groups, or markets
Available Business Processes:

--> Sales Processes - Create different sales processes that include some or all of the picklist values available for the Opportunity Stage field
--> Support Processes - Create different support processes that include some or all of the picklist values available for the Case Status field
--> Lead Processes - Create different lead processes that include some or all of the picklist values available for the Lead Status field
--> Solution Processes - Create different solution processes that include some or all of the picklist values available for the Solution Status field


Please let us know if this will help you

Thanks
Amit Chaudary
SandyMedaSandyMeda 
We have apex classes through which we send emails based on user action in force.com sites. It was working great until Friday, But yesterday when one of our customer try to submit application, they were getting error, In debug it says “SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, INVALID_TYPE: sObject type 'SalesforceIqDataSource' is not supported.: []”. I am pretty sure we did not change anything related to apex class, email template, vf page etc.. Does anyone know the reason or best way to fix this?
Best Answer chosen by SandyMeda
Signagelive DevelopmentSignagelive Development
Following on from Andrew's comment about Salesforce whitelisting the SalesforceIqDataSource for the site guest user I put in a ticket with Salesforce Support explaining the situation.

They whitelisted the SalesforceIqDataSource object for the site guest user for our organisation and I can confirm this has resolved the issue for us.

Therefore, for anyone still encountering this issue I was advise that you do the same thing and raise a ticket with Salesforce support.

Thanks everyone for the support on this.
Ram SRam S 
Hi All,
If any one finds difficulties in passing this challenge plz make changes in the VF page:
<apex:outputText value="{!sampleMergeField1}"/> <apex:outputText value="{!HTMLENCODE(sampleMergeField2)}" escape="false"/> <apex:outputText > {!sampleMergeField3} </apex:outputText> <script> document.write('{!JSINHTMLENCODE(sampleMergeField4)}'); </script> {!sampleMergeField5} <script> var x = '{!JSENCODE(sampleMergeField6)}'; </script> <apex:outputLabel value="{!HTMLENCODE(sampleMergeField7)}" escape="false"/>

Thanks,
Ram
Best Answer chosen by Ram S
Ram SRam S
<apex:outputText value="{!sampleMergeField1}"/> <apex:outputText value="{!HTMLENCODE(sampleMergeField2)}" escape="false"/> <apex:outputText > {!sampleMergeField3} </apex:outputText> <script> document.write('{!JSINHTMLENCODE(sampleMergeField4)}'); </script> {!sampleMergeField5} <script> var x = '{!JSENCODE(sampleMergeField6)}'; </script> <apex:outputLabel value="{!HTMLENCODE(sampleMergeField7)}" escape="false"/>
Bosede Omolayo 16Bosede Omolayo 16 
 Conference Management App - Create a Lightning Component with Server-Side Apex Controller:

Step 5: Add Component to the Speaker Record Page
Click App Default and then Assign as App Default.
Select the Conference app, then click Next and then Save.
Question: Does anyone know why Conference Management App is not listed for selection?

User-added image
I am also getting this error when I verify the hands on challenge:Note all APEX codes saved without errors. and all other steps worked.
Step 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.QueryException: List has no rows for assignment to SObject

Thanks in advance for your help.
Best Answer chosen by Bosede Omolayo 16
SandhyaSandhya (Salesforce Developers) 
Hi,

Make sure that you are using brand new trailhead playground for thid challenge as there may be some pre existing configuration that is preventing to check challenge.

Best Regards,
Sandhya
LinThawLinThaw 
Hi,

I got following error on step 3.

Challenge Not yet complete... here's what's wrong: 
Couldn’t find Agency records from the Account object.

Can anyone pass this step?
Thanks in advance.

Regards,
LinThaw
Best Answer chosen by LinThaw
LinThawLinThaw
Hi Jennifer and ankita,

Please refer below, I passed this step 3.

fig 1.
User-added image

fig 2.
User-added image


and create Top 5 Agencies lenses.

Regards,
LinThaw
EtienneCoutantEtienneCoutant 

Hi,

 

Can someone help, I keep getting the error:

System.DmlException: Insert failed. First exception on row 0 with id 00oS0000000AOgYIAW; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id]

 

But I am pretty sure that there is no Id specified in my insert call.

Here is my code:

 

 

public PageReference save() { List<OpportunityLineItemSchedule> revenueSchedulesToUpdate = new List<OpportunityLineItemSchedule>(); List<OpportunityLineItemSchedule> revenueSchedulesToInsert = new List<OpportunityLineItemSchedule>(); for(revenueSchedulesDate revenueSchedulesDate:revenueSchedulesDates){ for(OpportunityLineItemSchedule revenueSchedule:revenueSchedulesDate.getRevenueSchedules()){ if(revenueSchedule.get('Id') == null) revenueSchedulesToInsert.add(revenueSchedule); else revenueSchedulesToUpdate.add(revenueSchedule); } if(revenueSchedulesToUpdate.size() > 0) update revenueSchedulesToUpdate; if(revenueSchedulesToInsert.size() > 0) insert revenueSchedulesToInsert; } return Page.revenueScheduleView2; }

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
wesnoltewesnolte

Hey

 

You're getting this error becuase you're adding items to list; inserting the list; adding more items to the list; and then trying to insert all the items you've already inserted and the new ones.

 

You shouldn't be performing DML inside a loop, although isn't directly causing your issue. Try this instead:

 

    public PageReference save() {
        List<OpportunityLineItemSchedule> revenueSchedulesToUpdate = new List<OpportunityLineItemSchedule>();
        List<OpportunityLineItemSchedule> revenueSchedulesToInsert = new List<OpportunityLineItemSchedule>();
       
        for(revenueSchedulesDate revenueSchedulesDate:revenueSchedulesDates){
            for(OpportunityLineItemSchedule revenueSchedule:revenueSchedulesDate.getRevenueSchedules()){
                if(revenueSchedule.get('Id') == null)
                    revenueSchedulesToInsert.add(revenueSchedule);
                else
                    revenueSchedulesToUpdate.add(revenueSchedule);
            }
        }
       
        update revenueSchedulesToUpdate;
        insert revenueSchedulesToInsert;       
       
        return Page.revenueScheduleView2;
    }

 

This will help with governor limits(although this still depends on the amoutn of data you work with), and will avoid your other issue.

 

Wes

 

 

Camila CamargoCamila Camargo 
Hi, everyone.

I'm a Salesforce beginner and I need help with this code. I want to this "Don't show this again checkbox" makes the modal to stop showing up instead of the handler doInit. I thought that I could only change the function position on the component, but it doesn't work. Can any of you help me step by step to make this works, please? I appreciate your time and patience. Here is my code:

Component
<aura:component implements="flexipage:availableForAllPageTypes"
                access="global">
    
<!--<aura:handler name="init" action="{!c.doInit}" value="{!this}"/>-->
<aura:attribute name="isModalOpen" type="boolean" default="false"/> 
    
	<div class="demo-only">
        <!--Use aura:if tag to display/hide popup based on isModalOpen value-->  
        <aura:if isTrue="{!v.isModalOpen}">
  <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_small" aria-labelledby="welcome-mat-95-label" aria-describedby="welcome-mat-95-content" aria-modal="true">
    <div class="slds-modal__container">
      <header class="slds-modal__header slds-modal__header_empty">
        <lightning:buttonIcon iconName="utility:close"
                                              onclick="{! c.closeModel }"
                                              alternativeText="close"
                                              variant="bare-inverse"
                                              class="slds-modal__close"/>
      </header>
      <div class="slds-modal__content" id="welcome-mat-95-content" style="overflow: hidden">
        <div class="slds-welcome-mat slds-welcome-mat_splash">
          <div class="slds-welcome-mat__content slds-grid">
            <div class="slds-welcome-mat__info slds-size_1-of-1">
              <div class="slds-welcome-mat__info-content">
                <h2 class="slds-welcome-mat__info-title" id="welcome-mat-95-label">The Lightning Experience is here!</h2>
                <div class="slds-welcome-mat__info-description slds-text-longform">
                  <p>Welcome to Lightning Experience, the modern, beautiful user experience from Salesforce. With a sales-and service-centric mindset, we focused on reinventing the desktop environment to better support your business processes.</p>
                </div>
                <div class="slds-welcome-mat__info-actions">
                  <button class="slds-button slds-button_brand">Learn More</button>
                 <div class="slds-m-top_large">
                    <div class="slds-form-element">
                      <div class="slds-form-element__control">
                        <div class="slds-checkbox">
                          <input type="checkbox" name="init" id="checkbox-8" onchange="{!c.doInit}" value="{!this}" />
                          <label class="slds-checkbox__label" for="checkbox-8">
                            <span class="slds-checkbox_faux"></span>
                            <span class="slds-form-element__label">Don&#x27;t show this again</span>
                          </label>
                        </div>
                      </div>
                    </div>
                  </div> 
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
            
  <div class="slds-backdrop slds-backdrop_open"></div>
     </aura:if>
</div>
</aura:component>

Controller
({
   doInit: function(component, event, helper) { 
 var temperorySession = sessionStorage.getItem('tempSession');
  if(temperorySession == '1')
        {  
      console.log('===== in If');
            component.set("v.isModalOpen", false);
  }
        else
        {
      console.log('===== in else');
      component.set("v.isModalOpen", true);
  }
   sessionStorage.setItem('tempSession', '1');
 },
  
   closeModel: function(component, event, helper) {
      // Set isModalOpen attribute to false  
      component.set("v.isModalOpen", false);
   },
})

Style
 
.THIS.pop-up {
    display: block;
    opacity: 1;
    visibility: visible;
    background-color: transparent;
}

.THIS .slds-modal__inner {
    background: yellow;
    padding: 20px;
    text-align:left;
}

.THIS .slds-modal__pinner {
    background: #fff;
    padding: 20px;
}

Best Regards,

Camila Camargo
Full Stack Developer
Best Answer chosen by Camila Camargo
Khan AnasKhan Anas (Salesforce Developers) 
Hi Camila,

Greetings to you!

You need to use init handler also so that when component refreshes it should get tempSession. But you need to set its value on button or checkbox click (according to your requirement). I have made a few changes to the code. If you click on a button without selecting checkbox it will display modal again on refresh but if you click on a button after selecting a checkbox the modal will not show again for that session.

Kindly modify the code as per your requirement.

Component:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
    
    <aura:attribute name="isModalOpen" type="boolean" default="true"/>
    <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
    
    <div class="slds-m-around_xx-large" >
        
        <!--Use aura:if tag to display/hide popup based on isModalOpen value-->  
        <aura:if isTrue="{!v.isModalOpen}">
            
            <!-- Modal/Popup Box starts here-->
            <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open">
                <div class="slds-modal__container">
                    <!-- Modal/Popup Box Header Starts here-->
                    <header class="slds-modal__header" style="border-bottom: none; padding: 0">
                        <lightning:buttonIcon iconName="utility:close"
                                              onclick="{! c.closeModel }"
                                              alternativeText="close"
                                              variant="bare-inverse"
                                              class="slds-modal__close"/>
                    </header>
                    <!--Modal/Popup Box Body Starts here-->
                    <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" style="overflow: hidden">
                        <img src="/resource/1556211422000/polybday26" alt="Aniversario Polyorganic" />
                    </div>
                    
                    <!--Modal/Popup Box Footer Starts here-->
                    <footer class="slds-modal__footer">
                        <div class="slds-m-top_large">
                            <div class="slds-form-element">
                                <div class="slds-form-element__control">
                                    <div>
                                        <ui:inputCheckbox aura:id="checkbox-8" 
                                                          change="{!c.doInit}" 
                                                          label="Don&#x27;t show this again   "/>
                                        
                                    </div>
                                </div>
                            </div>
                        </div>
                        

                        <lightning:button variant="brand"
                                          label="OK"
                                          title="OK"
                                          onclick="{!c.submitDetails}"/>
                    </footer>
                </div>
            </section>
            <div class="slds-backdrop slds-backdrop_open"></div>
            
        </aura:if>
    </div>
</aura:component>

Controller:
({
    doInit: function(component, event, helper) {
        var temperorySession = localStorage.getItem('tempSession');
        if(temperorySession == '1')
        {  
            console.log('===== in If');
            component.set("v.isModalOpen", false);
        }
        else
        {
            console.log('===== in else');
            component.set("v.isModalOpen", true);
        }
        //localStorage.setItem('tempSession', '0');
    },
    
    openModel: function(component, event, helper) {
        // Set isModalOpen attribute to true
        component.set("v.isModalOpen", true);
        
        
    },
    
    closeModel: function(component, event, helper) {
        // Set isModalOpen attribute to false  
        component.set("v.isModalOpen", false);
    },
    
    submitDetails: function(component, event, helper) {
        // Set isModalOpen attribute to false
        //Add your code to call apex method or do some processing
        var checkCmp = component.find("checkbox-8");
        var resultCmp = checkCmp.get("v.value");
        console.log('resultCmp-> ' + resultCmp);
        if(resultCmp==true){
            localStorage.setItem('tempSession', '1');
        }
        component.set("v.isModalOpen", false);
    },
})

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas​​​​​​​
uptime_andrewuptime_andrew 

I have an APEX Trigger that runs when a Task is created/updated, so it can update the related Case. 

 

Somehow, the trigger is causing the Case Assignment Rules to re-fire, but I don't know what.  Any thoughts?

 

 

 

trigger caseLastActivityDate on Task (after insert, after update) { Map<String, Task> tMap = new Map<String, Task>(); for (Task t : System.Trigger.new) { String whatId = t.WhatId; System.debug('whatId is ' + whatId); if(whatId <> null && whatId.startsWith('500') == true) { Case c = [select Id from Case where Id = :whatId]; if(c.Id <> null) { c.Last_Activity_Date__c = t.LastModifiedDate; update c; } } } }

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
uptime_andrewuptime_andrew

The solution I had for this was two-fold:

 

First, we added a new field, "Case Taken", which is just a boolean.   Once the case is taken by a user (who is not the default assignee), Case Taken is set to true.

 

Second, we updated the assignment rules with an new entry/step where if Case Taken equals True and the owner is not the default assigner, use the "Do Not Reassign Owner" flag.

Roger FeltonRoger Felton 
I'm successfully logged in to both mobile and trailhead environments. I'm showing tasks perfromed and challenges completed successfully in the main and is supposed to show in the mobile. However, when I open the mobile and refresh, those fields are not there.  This also happens if I add a new entry in mobile (i.e. new contact).  it shows saved in mobile successfully but does not update in the main enviornment. It appears they aren't linking together and passing data. Any ideas how I can fix this? *I only have a trailhead account and 1 login. So I'm not usign teh wrong platforms.
Best Answer chosen by Roger Felton
SandhyaSandhya (Salesforce Developers) 
Hi,

In order to login to trailhead playground from mobile you need to get the username and password of the trailhead playground.

Refer below link and get your username and passowrd for trailhead playground.

https://force.desk.com/customer/portal/articles/2659738-how-to-get-a-password-for-my-trailhead-playground?b_id=13478
 
When you 'Launch' the trailhead playground from trailhead you will see something like below url.

https://resourceful-raccoon-181749-dev-ed.lightning.force.com/one/one.app#/sObject/Dashboard/home

Copy  https://resourceful-raccoon-181749-dev-ed.lightning.force.com from the above url and use as custom org in your mobile by providing the trailhead playground credentails.

Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
 
Best Regards
Sandhya
 
anil Kumaranil Kumar 
Hi All,

We have few web service call outs from salesforce community portal to external system. External system has been upgraded to TLS 1.2 protocol. Now they wants us to upgrade to LS 1.2 protocol version. Kidly help me how to upgrade TLS 1.2 version in salesforce?

Thanks,
Anil Kumar
Best Answer chosen by anil Kumar
Khan AnasKhan Anas (Salesforce Developers) 
Hi Anil,

Greetings to you!

It is possible to get this upgrade to TLS 1.2 "indirectly" by upgrading your browser to the latest version. You will automatically be using it if you are using updated browsers. Also, you update your JDK to the latest version.

To check if your browser can handle TLS v1.1 and v1.2, select https://www.ssllabs.com/ssltest/viewMyClient.html to open the SSL/TLS Capabilities of Your Browser web page.

Once the page completes the test, scroll down to the Protocol Features section.
  • If Yes is displayed next to TLS 1.1 and/or TLS 1.2, your browser will continue to work as it is currently does with Talent Suite applications.

However, Salesforce is requiring an upgrade to TLS 1.2 by September, 2019, in order to align with industry best practices for security and data integrity. Around this date, Salesforce will begin disabling the TLS 1.1 encryption protocol. 

A new Critical Update Console (CRUC) setting: "Require TLS 1.2 or higher for HTTPS connections" will be made available in the upcoming weeks. You can check the critical updates from Setup -> Search Critical Updates in Quick Find Box -> Select Critical Updates.

Please refer to the below link which might help you further with the above requirement.

https://help.salesforce.com/articleView?id=000221207&type=1

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas