• ALL STAR
  • 16416 Points
  • Member since 

  • Chatter
    Feed
  • 487
    Best Answers
  • 0
    Likes Received
  • 12
    Likes Given
  • 0
    Questions
  • 2124
    Replies
I am trying to maintain my PD I certification since a few days but i am getting the below error on checking challenge "Challenge not yet complete in Certification Org There was an issue processing your verification. Please refresh the page and try again."
Today is the last day of maintaining certification else it will be expired.
Please help.
rigger SameEmailOnAllContacts on Account (after update) {
    Set<Id> setAccountId = new Set<Id>();
    for(Account acc:trigger.new) 
    {
        if(Trigger.oldMap.get(acc.ID).Email__c != acc.Email__c || Trigger.oldMap.get(acc.ID).phone != acc.phone) {
            setAccountId.add(acc.id);
        }
    }
    List<Contact> lstContact = new List<Contact>();
    
    for(Account acc:[Select id,Email__c,(select id,Email from Contacts) from Account where Id in:setAccountId])
    {
        for(Contact con:acc.contacts)
        {  
            if(con.Email != acc.Email__c) 
            {
                con.Email = acc.Email__c;
                lstContact.add(con);
            }
        }
    }
    if(lstContact.size() >0) {
        update lstContact;
    }
}

Please help me on this !!!!

 
@isTest
public class SameEmailOnAllContactsTest{
 public static testMethod void Test()
 {
 
 Account acct=new Account();
        acct.name='a';
        acct.industry='Electronics';   
        insert acct;
        
         Contact ct = new Contact();
         
         ct.LastName ='Hoal';
         
          insert ct;
 
 }
 }

 
I just want a Controller Class for the Below Visualforce Page.
Please Help me in it.

Here below is my VF Page.


<apex:page controller="Booking_Link__c">
    <apex:form >
        <apex:sectionHeader title="Person Customer Edit" subtitle="New Customer"/>
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!cancel}" value="cancel"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Customer Information" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.Name}"/>
                <apex:inputField value="{!booking link__c.Salutation__c}"/>
                <apex:inputField value="{!booking link__c.First_Name__c}"/>
                <apex:inputField value="{!booking link__c.Middle_Name__c}"/>
                <apex:inputField value="{!booking link__c.Last_Name__c}"/>
                <apex:inputField value="{!booking link__c.Gender__c}"/>
                <apex:inputField value="{!booking link__c.Relation__c}"/>
                <apex:inputField value="{!booking link__c.Father_Husband__c}"/>
                <apex:inputField value="{!booking link__c.    Pan_Number__c}"/>
                <apex:inputField value="{!booking link__c.    Aadhar_Number__c}"/>
                <apex:inputField value="{!booking link__c.Date_Of_Birth__c}"/>
                <apex:inputField value="{!booking link__c.Wedding_Anniversary__c}"/>
                <apex:inputField value="{!booking link__c.Mobile__c}"/>
                <apex:inputField value="{!booking link__c.Alternate_Mobile__c}"/>
                <apex:inputField value="{!booking link__c.Phone__c}"/>
                <apex:inputField value="{!booking link__c.Other_Phone__c}"/>
                <apex:inputField value="{!booking link__c.Home_Phone__c}"/>
                <apex:inputField value="{!booking link__c.Email__c}"/>  
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Professional Information" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.Profession__c}"/>
                <apex:inputField value="{!booking link__c.Designation__c}"/>
                <apex:inputField value="{!booking link__c.Professional_Email__c}"/>
                <apex:inputField value="{!booking link__c.Annual_Income__c}"/>
                <apex:inputField value="{!booking link__c.CompanyMobile__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Office Address" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.Employed_by__c}"/>
                <apex:inputField value="{!booking link__c.OfficeStreet__c}"/>
                <apex:inputField value="{!booking link__c.OfficeCity__c}"/>
                <apex:inputField value="{!booking link__c.OfficeState__c}"/>
                <apex:inputField value="{!booking link__c.OfficeCountry__c}"/>
                <apex:inputField value="{!booking link__c.OfficePinCode__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Children School Address" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.School_Name__c}"/>
                <apex:inputField value="{!booking link__c.SchoolStreet__c}"/>
                <apex:inputField value="{!booking link__c.SchoolCity__c}"/>
                <apex:inputField value="{!booking link__c.SchoolState__c}"/>
                <apex:inputField value="{!booking link__c.SchoolCountry__c}"/>
                <apex:inputField value="{!booking link__c.SchoolPinCode__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Address Information" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.BillingCountry__c}"/>
                <apex:inputField value="{!booking link__c.ShippingCountry__c}"/>
                <apex:inputField value="{!booking link__c.BillingStreet__c}"/>
                <apex:inputField value="{!booking link__c.ShippingStreet__c}"/>
                <apex:inputField value="{!booking link__c.BillingCity__c}"/>
                <apex:inputField value="{!booking link__c.ShippingCity__c}"/>
                <apex:inputField value="{!booking link__c.BillingState__c}"/>
                <apex:inputField value="{!booking link__c.ShippingState__c}"/>
                <apex:inputField value="{!booking link__c.BillingPinCode__c}"/>
                <apex:inputField value="{!booking link__c.ShippingPinCode__c}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
Is it possible to connect two Salesforce instances using named credentials and password authentication for the authentication protocol instead of OAuth 2.0? I've read that when connecting between two Salesforce instances, password authentication won't work. Thank you. 
  • August 22, 2019
  • Like
  • 0
Hi there, I'm not sure what's wrong with my logic here:

AND ( ISPICKVAL(A_la_carte__c, "")
)
OR (
ISPICKVAL( Opportunity_Type__c, "Video Ad Server"),  
ISPICKVAL( Opportunity_Type__c, "VAD Renewal"),
ISPICKVAL( Opportunity_Type__c, "Amendment"),
) )

I'm trying to say, if the opportunity type selected is any of the above, and a value is not selected in the drop down 'A_la_carte__c' then show validation rule. I'm getting the synax error "Extra OR." Thanks in advance for your help.

I have set Default value for a Picklist, but to my luck it is not working, don't know the reason for the same.

Can anyone help me with any workaround? Even Custom Picklists are not working with default values on Account. Although it is working for Contact. 

Default Value:
User-added image

New Account Page:
User-added image
 

  List<Lead> numberOfLeads = [select Id from Lead];
   System.debug(numberOfLeads.size());

I need number of Leads but above my code is returning 0 always, please help me. thanks in advance
How we can identify if lightning web component (LWC) is running in Salesforce mobile app or in desktop browser?
Hi experts,
Can we  bypass a trigger when submitting the custom VF page?
  • August 20, 2019
  • Like
  • 0
I am new to salesforce.I have created lightning app  with no error and when I have tried to preview it I am getting error.Not understanding what it is.Please help me out.
Below are the details of my code and error:-

My lightning component :-myFirstLightComp.cmp
<aura:component>
  <aura:attribute  name="first_name" type="String" default="shraddha"/>
  <aura:attribute  name="last_name" type="String" default="vasu" />
  <aura:attribute name="result_us_style" type="String" />

  <ui:inputText label="Enter your first name" value="{!v.first_name}" />
  <ui:inputText label="Enter your last name" value="{!v.last_name}" />
  <br />
  <ui:button  label="submit" press="{!c.doSubmit}" />
  <br />

  <ui:outputText value="{!v.result_us_style}" />
</aura:component>

My lightning controller:- myFirstLightCompController.js
 ({
    doSubmit: function(component, event, helper) {
        console.log(----Start of doSubmit----);
            var firstname =component.get("v.first_name");
            var lastname=component.get("v.last_name");

            var usStyleName=firstname +', '+lastname;

            component.set("v.result_us_style" , usStyleName);

            console.log("*******Operation success*******and******Result*********"+usStyleName);

        console.log(----End of doSubmit----);
        
    }
})

My lightning App:-myFirstLightApp.app

<aura:application>
    <c:myFirstLightComp />
</aura:application>     

I have registered the domain for this also.

This is the error I am getting while previewing the lightning app.
Thanks in advance!!!
I have a Flow that creates a Case from an Opportunity. I don't want it to return to the Opportunity but rather when the Flow finishes I want to see the Newly Created Case
Hi..

Is DebugApex applicable in Develop edition?

I got the following message with I try to debug:
you exceeded your licensed number of debugging session. please end other session or purchase more.

Should I pay it? or I can debug it with my Develop Edition?

Thanks
Challenge 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.DmlException: Insert failed. First exception on row 0; first error: CANNOT_EXECUTE_FLOW_TRIGGER, We can't save this record because the “Fulfillment Creation” process failed. Give your Salesforce admin these details. This error occurred when the flow tried to create records: FIELD_INTEGRITY_EXCEPTION: Assigned To ID: id value of incorrect type: 0063i000003ZVyyAAG. You can look up ExceptionCode values in the SOAP API Developer Guide. Error ID: 990470032-165661 (-1137041356): []
Hello guys! :)

Could someone help me with this?

I'm trying to deploy classes and triggers using the change set settings, but the error bellow persists. Can anyone help? Because in my researches, I found out that I'm not the only one to face that, even though , is so difficult to find a solution...

Error:

' line -1, column -1: Dependent class is invalid and needs recompilation: Class <class name> : Variable does not exist: run
Stack Trace: null '

I've tried:

> Opened a ticket on SF to the "Compile all triggers" to appears in my work org;
> Compile all triggers and classes;
> Update the API versions of my classes and triggers;
> Validat my classes with the other components that it has dependencies.

I don't know what more I can do...


<apex:page standardController="Account" >
    <apex:form>
        <apex:sectionHeader title="Person Customer Edit" subtitle="New Customer"/>
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!cancel}" value="cancel"/>
                </apex:pageBlockButtons>
            </apex:pageBlock>
        <apex:pageBlock>
<apex:pageBlockSection>
    <apex:pageBlockSectionItem>
<apex:outputlabel value="First Name"/>
<apex:outputpanel>
<apex:inputText value="{!salutation}" id="personSalutation"/>
<apex:inputText value="{!fname}" id="personFname"/>
</apex:outputpanel>
        </apex:pageBlockSectionItem>
</apex:pageBlockSection>
            </apex:pageBlock>
    <apex:pageBlock>
        <apex:pageBlockSection>
<apex:pageBlockSectionItem>
<apex:outputLabel value="Last Name" for="personLname"></apex:outputLabel>
<apex:inputText value="{!lname}" id="personLname"/>
</apex:pageBlockSectionItem>
           </apex:pageBlockSection> 
            </apex:pageBlock>
    </apex:form>
</apex:page>

this is my code which i was unable to do.
My Error: Unknown property 'AccountStandardController.salutation'

Hello there,

I am new to saleforce development, I'd highly appreciate your help on this. I am trying to create a .net console application to get data from saleforce in json format using REST API. Do you know how to go about doing this? The only guide I've gotten so far is this article: Integrating Net and Saleforce (https://blog.mkorman.uk/integrating-net-and-salesforce-part-1-rest-api/)

Hey guys , I am beginner to salesforce, my reqirement is i want to invoke validation rule only when  i am inserting the record and should not invoke when I am updating my record , also this is to be achived by using admin part and not through coding,, so it is possible ?? 

Note- Please dont share any link for this,, if possible give me explanation with example
thank you
Hi, I'm new to salesforce administration and I'm trying to figure it out why Schema Builder doesn't show the master->detail relationship between Account and Opportunity, there are only 2 blue lines (lookup) between these 2 objects.
Can you comment on this?

User-added image

 
Hi, Can someone please explain why in some programs they have used Account[] everywhere and somewhere they have created lists and then written SOQL on accounts?

TIA
I am trying to maintain my PD I certification since a few days but i am getting the below error on checking challenge "Challenge not yet complete in Certification Org There was an issue processing your verification. Please refresh the page and try again."
Today is the last day of maintaining certification else it will be expired.
Please help.
rigger SameEmailOnAllContacts on Account (after update) {
    Set<Id> setAccountId = new Set<Id>();
    for(Account acc:trigger.new) 
    {
        if(Trigger.oldMap.get(acc.ID).Email__c != acc.Email__c || Trigger.oldMap.get(acc.ID).phone != acc.phone) {
            setAccountId.add(acc.id);
        }
    }
    List<Contact> lstContact = new List<Contact>();
    
    for(Account acc:[Select id,Email__c,(select id,Email from Contacts) from Account where Id in:setAccountId])
    {
        for(Contact con:acc.contacts)
        {  
            if(con.Email != acc.Email__c) 
            {
                con.Email = acc.Email__c;
                lstContact.add(con);
            }
        }
    }
    if(lstContact.size() >0) {
        update lstContact;
    }
}

Please help me on this !!!!

 
@isTest
public class SameEmailOnAllContactsTest{
 public static testMethod void Test()
 {
 
 Account acct=new Account();
        acct.name='a';
        acct.industry='Electronics';   
        insert acct;
        
         Contact ct = new Contact();
         
         ct.LastName ='Hoal';
         
          insert ct;
 
 }
 }

 
Customize Your Login Process with My Domain

When I try to launch my trailhead developer edition, It fails with below error

"This site can’t be reached
curious-badger-vv2jvj-dev-ed.my.salesforce.com’s server IP address could not be found."

I am guessing because of the new domain created. 

But the trailhead is still trying to connect the old domain how to make it redirect it to new domain.
Please help me complete this challenge
Hi,
I am new to Service Cloud and Lightning Knowledge. I am dealing with a requirement of sending an email when a case is created with related knowledge article automatically in lightning experience which means that before the agent could respond if the article is sent to the customer with related artcile link, it would be better. Could anyone help me out regarding this? 

Thanks in Advance.
I just want a Controller Class for the Below Visualforce Page.
Please Help me in it.

Here below is my VF Page.


<apex:page controller="Booking_Link__c">
    <apex:form >
        <apex:sectionHeader title="Person Customer Edit" subtitle="New Customer"/>
        <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!cancel}" value="cancel"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Customer Information" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.Name}"/>
                <apex:inputField value="{!booking link__c.Salutation__c}"/>
                <apex:inputField value="{!booking link__c.First_Name__c}"/>
                <apex:inputField value="{!booking link__c.Middle_Name__c}"/>
                <apex:inputField value="{!booking link__c.Last_Name__c}"/>
                <apex:inputField value="{!booking link__c.Gender__c}"/>
                <apex:inputField value="{!booking link__c.Relation__c}"/>
                <apex:inputField value="{!booking link__c.Father_Husband__c}"/>
                <apex:inputField value="{!booking link__c.    Pan_Number__c}"/>
                <apex:inputField value="{!booking link__c.    Aadhar_Number__c}"/>
                <apex:inputField value="{!booking link__c.Date_Of_Birth__c}"/>
                <apex:inputField value="{!booking link__c.Wedding_Anniversary__c}"/>
                <apex:inputField value="{!booking link__c.Mobile__c}"/>
                <apex:inputField value="{!booking link__c.Alternate_Mobile__c}"/>
                <apex:inputField value="{!booking link__c.Phone__c}"/>
                <apex:inputField value="{!booking link__c.Other_Phone__c}"/>
                <apex:inputField value="{!booking link__c.Home_Phone__c}"/>
                <apex:inputField value="{!booking link__c.Email__c}"/>  
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Professional Information" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.Profession__c}"/>
                <apex:inputField value="{!booking link__c.Designation__c}"/>
                <apex:inputField value="{!booking link__c.Professional_Email__c}"/>
                <apex:inputField value="{!booking link__c.Annual_Income__c}"/>
                <apex:inputField value="{!booking link__c.CompanyMobile__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Office Address" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.Employed_by__c}"/>
                <apex:inputField value="{!booking link__c.OfficeStreet__c}"/>
                <apex:inputField value="{!booking link__c.OfficeCity__c}"/>
                <apex:inputField value="{!booking link__c.OfficeState__c}"/>
                <apex:inputField value="{!booking link__c.OfficeCountry__c}"/>
                <apex:inputField value="{!booking link__c.OfficePinCode__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Children School Address" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.School_Name__c}"/>
                <apex:inputField value="{!booking link__c.SchoolStreet__c}"/>
                <apex:inputField value="{!booking link__c.SchoolCity__c}"/>
                <apex:inputField value="{!booking link__c.SchoolState__c}"/>
                <apex:inputField value="{!booking link__c.SchoolCountry__c}"/>
                <apex:inputField value="{!booking link__c.SchoolPinCode__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection title="Address Information" collapsible="false" columns="2">
                <apex:inputField value="{!booking link__c.BillingCountry__c}"/>
                <apex:inputField value="{!booking link__c.ShippingCountry__c}"/>
                <apex:inputField value="{!booking link__c.BillingStreet__c}"/>
                <apex:inputField value="{!booking link__c.ShippingStreet__c}"/>
                <apex:inputField value="{!booking link__c.BillingCity__c}"/>
                <apex:inputField value="{!booking link__c.ShippingCity__c}"/>
                <apex:inputField value="{!booking link__c.BillingState__c}"/>
                <apex:inputField value="{!booking link__c.ShippingState__c}"/>
                <apex:inputField value="{!booking link__c.BillingPinCode__c}"/>
                <apex:inputField value="{!booking link__c.ShippingPinCode__c}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
Hi Friends,

Getting some weird errors when I try to run package:version: create

The classes that are being listed in the errors are in another package. The dependency is defined in the JSON and I  updated this package version today. Any thoughts on what would be going wrong here?

Short of just removing all the dependencies and starting over.
 
ContactStatusManager_Test: Variable does not exist: TestDataFactory,AppSwitcher: An unexpected error occurred. Please include this Err
orId if you contact support: 169023167-52320 (442557440),Admin: In field: apexClass - no ApexClass named CampaignMemberStatusFactory found,CampaignMemberStatusTriggerHandler: Depe
ndent class is invalid and needs recompilation:
 Class CampaignMemberStatusFactory : Variable does not exist: RecordTypeSelector,CampaignMemberStatusFactory: Variable does not exist: RecordTypeSelector,ContactStatusManager_Test
: Variable does not exist: TestDataFactory

 
Is it possible to connect two Salesforce instances using named credentials and password authentication for the authentication protocol instead of OAuth 2.0? I've read that when connecting between two Salesforce instances, password authentication won't work. Thank you. 
  • August 22, 2019
  • Like
  • 0
Is it possible to allow a user to only be able to edit one specific field when a record is locked? I am trying to send an email from a workflow or a visualforce page because sending from Apex has been a rabbit hole at this point so I am looking for other options, Anyone have any insight? 
I am trying to create a LWC that is aware of whether or not the App it is embedded in is uses Console or Stanadard navigation style.

I need this because I have two separate apps using the same component, one for fully licensed users and another for those only with Company Community.  

If console, I need to use Navigation.Mixin, for Standard, I just open a new window.

I've tried calling UserInfo.getUiThemeDisplayed() but I just get Theme4d returned regardless of which app I'm using.
 
Hi there, I'm not sure what's wrong with my logic here:

AND ( ISPICKVAL(A_la_carte__c, "")
)
OR (
ISPICKVAL( Opportunity_Type__c, "Video Ad Server"),  
ISPICKVAL( Opportunity_Type__c, "VAD Renewal"),
ISPICKVAL( Opportunity_Type__c, "Amendment"),
) )

I'm trying to say, if the opportunity type selected is any of the above, and a value is not selected in the drop down 'A_la_carte__c' then show validation rule. I'm getting the synax error "Extra OR." Thanks in advance for your help.
Hi,

What I tried to do?
1. I created 7 custom objects, say obj1, obj2 up to obj7. 
2. For obj2, added a custom field with data type as 'Master-Detail Relationship' with obj1, like that created relationship as below 
obj1 <- obj2 <- ob3 -< obj4.
But I can not connect the obj5 with obj4 with the master-detailed relationship. Is there any way/workaround to can achieve this. Can someone please help.  


 
I am posting this question again because nobody knew how to solve this.

My team was creating some custom list views.

When I want to create my own custom list view, the "Name" field needs to be populated - I click in the field to add the name and all the other names added by my coleagues pop up! Some coleague even added someting personal accidentaly and it got saved.

It is as if I wrote something in google and "last searches" popped up.

I need to disable this.
Hi,

I'm getting System.TypeException: Invalid conversion from runtime type List<ANY> to Map<String,ANY> error in Test Class. The response body that I have created is res.setBody('[{"attributes": {"type": "Account"},"name": "test"}]');
 This is the line of the main class where test class throws error.
Map<String, object> o = (Map<String, object>) JSON.deserializeUntyped(input);
Any help would be appreciated.
Thanks!!
Hi,

I want to create a save button on lightning component for my object Shipping Address which is child to parent Account.

There are 6 fields in shipping address, I want those fields to get saved and displayed on the lightning component 

I am tricked about how do i save it into database and get it displayed on my screen.

Can anyone help me on this please
 
Has anyone successfully changed the color of a link in a Lightning Component based on some attribute on the Component?  I can change the link color all the time but not conditionally.
I am working through Start Routing with Omni-Channel.

I am stuck on 
From the console, click Omni-Channel in the console footer to open the Omni-Channel widget. Set your status to Available - Case.

1. There is no footer widget for me. Screenshot here: User-added image

I've double checked the set up of my Omni Channel and case are correct. I've also tried deleting and redoing my case, but I still can't get it to appear. Any ideas?

Thanks in advance!
I need an urgent help..!
Create the lightning component which show the selected Accounts from the list view and on click of send button sends the email to selected Account's email id. (here a Email is a custom field on account)
use email template
for email content.

Please post the code..

Thankyou..!
I am trying to write a batch apex to schedule and delete cases that were created before 18 months along with the related files. Can someone help me with formulating the query, please?
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
Hello All,

I am very new to Lightning development and salesforce in general.

I am trying to make a simple component that consists of tabs with a graph in each one. I have directly copied and pasted the example of a simple tabset from (https://developer.salesforce.com/docs/component-library/bundle/lightning:tabset/example

My issue is that the styling looks like it is entirely missing. Below is a picture of the result: 
User-added image

I have noticed that I am getting an error that may or may not be related to this but I have been unable to find anything about it other than to modify our CSP which doesn't sound right to me. paste of the  error below: 

Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'nonce-[removed as im not sure if this is sensitive]' chrome-extension: 'unsafe-inline' 'unsafe-eval' https://sfdc.azureedge.net *.cs19.visual.force.com https://ssl.gstatic.com/accessibility/". Note that 'unsafe-inline' is ignored if either a hash or nonce value is present in the source list.

This error is repeated each time I click on an item in the tabset.

Has anyone had this issue or know what is possibly causing it? Any help would be greatly appreciated.

Thanks,
Travis
Hi, I'm trying to create a new empty project using the Salesforce CLI and I receive the message "ERROR running force:project:create  Cannot read property 'create' of undefined".    Does anyone know what might be causing this or how to further troubleshoot it? 

The command I'm entering in the terminal is "sfdx force:project:create --projectname VSCodeQuickStart".   I've tried "sfdx force:project:create --projectname VSCodeQuickStart --manifest" as well.


Thank you


 
We have a VisualForce page that needs to be displayed on our website through an iframe. The problem is that both Mozilla and Chrome are displaying error message, saying that the connection is not secured. 

"Your connection is not secure
The owner of xyz.force.com has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website."

I checked the configuration of our site in Salesforce. It looks like HTTPS is enabled. We have a self-signed certificate, but that's it. 

We're using Salesforce Classic and for the moment there's no project to use tools like Canvas or Lightning out...  
Any suggestions? 
Thanks.  

Good Morning folks,

I have a component to inset case, but is experiencing an error of  log:
 

"first error: INVALID_FIELD, Cannot specify both an external ID reference Account and a salesforce id, AccountId: []"


Basically this code :
 

Component.cmp

 <aura:attribute name="caseObj" type="case" default="{'sobjectType': 'Case',
                         'AccountId': '',
                         'MSISDN__c': '',
                         'Status': ''
                    }"/>



<label>Montadora</label>
       <force:inputField aura:id="AccountId"  value="{!v.caseObj.AccountId}"/>
           
</div>
<div class="form-group">
            <label>MSISDN</label>
            <ui:inputText class="form-control" value="{!v.caseObj.MSISDN__c}"/>
</div>  
    
    
    <div class="form-group">
            <label>Status</label>
            <force:inputField aura:id="Status"  value="{!v.caseObj.Status}"/>
</div>   


-----------------------------------------------------------

controller.js

  create: function(component, event, helper)    {
        
        console.log('Create record');
    
        var caseObj = component.get("v.caseObj");
        
        
        var action = component.get("c.createRecord");
      
        
        action.setParams({
            caseObj : caseObj
        });



-------------------------------------------------------------------

Class.apxc

 @AuraEnabled
    public static void createRecord (Case caseObj){
        
        try{
            System.debug('NovoCasoComponentController::createRecord::caseObj'+ caseObj);
            
            if(caseObj != null){
                insert caseObj;
            }
            
        } catch (Exception ex){
            
        }
        
    }    




Thanks

I'd like to get the Sites domain that configured for an org via Apex in order to automate some setup work.  I haven't found a way to do that.  It's probably not there but just in case I missed it in the documentation I figured I'd ask if anyone knows if there's any kind of metadata call to get it.

This is not specific to any one site and VF is not in place so anything that only exists in the context of an executing Site will not work.
I'm trying to create a button that will toggle a checkbox (i.e. if checked then uncheck, if unchecked then check). This checkbox will trigger a workflow rule that will send an email to the contact 24 hours later.

I realize that these buttons may become obsolete in Lightning, but my org does not wish to switch in the forseeable future (not my decision).

Any help is much appreaciated!
I am using google crome browser and performing inline editing on lightning datatable.

I am able to display the field values but when I edit Opportunity Name and click save its not saving.

Please let me know the issue.
 
public class DataTableController {

    @AuraEnabled
    public static List<Opportunity> getOpportunities()
    {
        List<Opportunity> oppList=new List<Opportunity>();
        
        oppList=[select Name,Account.Name,StageName,CloseDate,Amount from Opportunity
                 where Amount != NULL];
        
        return oppList;
    }
    
    @AuraEnabled
    public static void updateOpportunities(List<Opportunity> oppsList){
        try
        {
            Database.update(oppsList);
            
          }
        catch(Exception ex)
        {
            system.debug(ex.getMessage());
        }
    }
}

<aura:component implements="force:appHostable,force:hasRecordId,flexipage:availableForAllPageTypes" 
                controller="DataTableController"
                access="global">
	
        <!-- Three important parts of datatable is Key , data and columns
         so we need attribute for data and columns(metatadata)-->
    <!-- attributes -->
    <aura:attribute name="data" 
                    type="Object"/>
    
    <aura:attribute name="columns" 
                    type="List"/>
    
<aura:attribute name="updatedRecord" type="Object[]" />

    <!-- handlers-->
    <aura:handler name="init" 
                  value="{!this}" 
                  action="{!c.doInit}"/>
    
    <lightning:card title="OpportunityDatatable">
        
        <lightning:datatable aura:id="opportunitydatatable"
                             keyField="id"
                             data="{!v.data}"
                             columns="{!v.columns}"
                             onsave="{!c.handleSaveOpps}"
                             hideCheckboxColumn="true"/>
        
</lightning:card>
    
    {!updatedRecord}

</aura:component>

({
	doInit : function(component, event, helper) {
        
        helper.queryColumns(component,event,helper);
        
        helper.queryContacts(component,event,helper);
  	},
    
    handleSaveOpps: function (component, event, helper) {
        debugger;    
        var draftValues = event.getParam('draftValues');
console.log(draftValues);
        var action = component.get('c.updateOpportunities');
        action.setParams({ 
            "oppsList": draftValues
        });
        action.setCallback(this, $A.getCallback(function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                helper.fireSuccessToast(component);  
                helper.fireRefreshEvt(component);
            } else if (state === "ERROR") {
                var errors = response.getError();
                console.error(errors);
                helper.fireFailureToast(component);  
            }
        }));
        $A.enqueueAction(action);
    }
     
})


({
	queryColumns : function(component,event,helper) {
        
		  component.set('v.columns', [
            {label: 'Opp Name', fieldName: 'Name', editable : 'true', type: 'text'},
            {label: 'Acc Name', fieldName: 'AccountName', type: 'text'},
            {label: 'StageName', fieldName: 'StageName', type: 'text'},
            {label: 'CloseDate', fieldName: 'CloseDate', type: 'date'},
            {label: 'Amount', fieldName: 'Amount', type: 'currency', cellAttributes: { alignment: 'left' }} 
        ]);
	},
    
    queryContacts : function(component,event,helper) {
        
        var action=component.get('c.getOpportunities');
        
        action.setParams({
        });
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                
                  //the following code will display the parent account name
                 var rows = response.getReturnValue();
                 for (var i = 0; i < rows.length; i++) {
                    var row = rows[i];
                    if (row.Account) row.AccountName = row.Account.Name;
                }
                //component.set("v.data", response.getReturnValue());
                 component.set("v.data", rows);
            }
        });
        $A.enqueueAction(action);
    },
    
     fireSuccessToast : function(component) {
        var toastEvent = $A.get("e.force:showToast");
        toastEvent.setParams({ 
            'title' : 'Success', 
            'message' : 'Opportunities updated sucessfully.' ,
            'type':'success'
        }); 
        toastEvent.fire(); 
    },
    
    fireFailureToast : function(component) {
        var toastEvent = $A.get("e.force:showToast");
        toastEvent.setParams({ 
            'title' : 'Failed', 
            'message' : 'An error occurred. Please contact your administrator.',
            'type':'error'
        }); 
        toastEvent.fire(); 
    },
    
    fireRefreshEvt : function(component) {
        var refreshEvent = $A.get("e.force:refreshView");
        if(refreshEvent){
            refreshEvent.fire();
        }
    }
       
})