• ALL STAR
  • 18615 Points
  • Member since 

  • Chatter
    Feed
  • 559
    Best Answers
  • 0
    Likes Received
  • 12
    Likes Given
  • 0
    Questions
  • 2402
    Replies
FYI:

Challenge not yet complete in DreamHouse
The page does not have the 'showHeader' attribute set to false


If we look at the note in this module:

Beyond the Basics
Note that both the sidebar and showHeader attribute have no effect in Lightning Experience, and that there’s no way to suppress the Lightning Experience header. Although the default value of showHeader is true, it has no effect in Lightning Experience.
The page still includes some Salesforce style sheets, which let you match Salesforce choices for fonts, size, and so on. To suppress all Salesforce output, add standardStylesheets="false" to remove the styles as well.


We see that showHeader is obsolete and there is no reason to add it.

In the challenge it is specified that the standard SalesForce header should not be displayed:

It must NOT display the standard Salesforce header

I assume the module was created for Classic or did I miss something basic regarding this attribute in LE ? I'm currently on SU19.

with Regards
Filip Poverud
I'm wrtting a trigger which restricts an account to be deleted if it has opportunities. Below is the Apex class & trigger.

Apex Class:
public class RestrictAccountDeleteClass
{
public static void RestrictAccountDelete(list<account>AccList)
{
list<account> OldAccList = new list<account>();
OldAccList = [SELECT Id, (SELECT Id FROM Opportunities ) FROM Account WHERE Id IN : AccList];
for(Account a : OldAccList)
{
if(a.Opportunities.size()!=0)
{
a.addError('Cannot delete account as it has associated opportunities');
}
}
}
}

Trigger:
trigger RestrictAccountDeleteTrigger on Account (before delete) {
if(trigger.isBefore==true && trigger.isDelete==true){
RestrictAccountDeleteClass.RestrictAccountDelete(trigger.old);
}
}

When I try to delete a record, it gives the following error: Validation Errors While Saving Record(s)
There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Apex trigger RestrictAccountDeleteTrigger caused an unexpected exception, contact your administrator: RestrictAccountDeleteTrigger: execution of BeforeDelete caused by: System.FinalException: SObject row does not allow errors: Class.RestrictAccountDeleteClass.RestrictAccountDelete: line 11, column 1".

Can someone please let me know where I am going wrong?
 @AuraEnabled
    @Future(callout=true)
    public static void makePostCallout(String reqId) 
    {}

Can I do this?
I am not getting any error for this.
I need to call this method from trigger as well as lightning component.
Hello,

I have below code which was workign in Sandbox but on production it fails because records are more than 50000, how can i solve this issue without regression.
public static void PutCodeForAccount( List<Account> accountList ){
Account acc = getLatestAccount();
if(acc != null) {
            Integer intValue = getIntFromName(acc.Code__c);
}

//Method to get the Last inserted Record based on created Date for the existing records
    private static Account getLatestAccount() {
        List<Account> accounts = [SELECT ID, NAME, Code__c  FROM Account ORDER BY CreatedDate Desc];  ///// System.LimitException: Too many query rows: 50001
        if(accounts.size() > 0) {
            return accounts[0];
        }
        return null;
    }

// Method to spilt the first 4 characters from concatinated number
    private static Integer getIntFromName(String Name) {
        String phrase = Name;
        
        Integer rephrase = null;
        
        if(phrase != null && phrase.length() > 4) {
            phrase = phrase.substring(4, phrase.length());
            if(phrase.isNumeric()) {
                rephrase = Integer.valueOf(phrase);
            }
        }
        return rephrase;
    }

The account code(Code__c) lookss like ABCD980001

So the above code takes the integer value of the code from the latest inserted account.

I just want to get the last inserted account

Thanks for help
On Account object I want a field (NumberOfContacts__c) to show the number of associated child Contacts. Can someone please help me with the Apex Class for this trigger which should work in all DML operations such as Create, Update, Delete and UnDelete? Thanks in advance.
I cannot complete the Lightning Experience Rollout Specialist Supderbadge. Everytime I tried to complete the Challenge 6 it gives me this error
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: HSMONHBW

What should I do ?
Hi,

I'm working thru the trailhead "Salesforce User Tour" - "Check Out Reports Dashboards Feeds and More".  Create a List View section instructs me to ...
  1. From List View Controls, select New. A dialog box appears.
  2. Enter a name for your list.
  3. Choose who can see this list view: just you, or all users, including Partner and Customer Portal users.
  4. Click Save. The Filters panel appears...
I'm not sure what is this List View Controls, what page I'm supposed to be on and even if I tried anything and select New, I'm not following "Enter a name for your list".  There's no such thing.

Any suggestion is appreciated.  Thanks,
Tienlist view controls click New??
//converted the blob image to base64.
 string paramvalue = EncodingUtil.base64Encode(imgeBody);
visualforcepage:
 
<apex:inputFilevalue="{!imgeBody}"  filename="{!imgefilename}"  > </apex:inputFile> 

public blob imgeBody{get;set;}
 public string imgefilename{get;set;}

   //converted to base64string 
  string paramvalue = EncodingUtil.base64Encode(imgeBody);
       
    
       // used rest callout  to post 
        gen.writestringField('imge', paramvalue);

  in respnse i got the base64 value , i had decoded it but it is not getting displyed can anybody solove this issue..

 
public string imagetest{get;set;}

 public blob getimage{get;set;}

//parsed data form the response 

if(jp.getcurrenttoken()==system.jsontoken.field_name && jp.gettext()=='img'){
        
        
        
        jp.nexttoken();
        
        
        
        imagetest = jp.gettext();  //base64 stirng is stored .
        
        getimage =EncodingUtil.base64Decode(imagetest ); 
        
      
        
        }


visualforce page:


<apex:image value="{!getimage}" alt="your image"   /> 
i have done image to base64 and while decoding it and displaying it was not displaying may i know how to solve this thanks ..


 
2019-10-02 08:31:41,837 INFO  [SOOverallstatusUpdate] client.PartnerClient login
Internal (PartnerClient.java:523) - Salesforce login to https://login.salesforce
.com/services/Soap/u/38.0 as user UserID
------------ Request start   ----------
<?xml version="1.0" encoding="UTF-8"?><env:Envelope
   xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w
3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <env:Header>
  <CallOptions xmlns="urn:partner.soap.sforce.com">
   <client>DataLoaderPartnerBatch/38.0</client>
   <defaultNamespace xsi:nil="true" />
  </CallOptions>
 </env:Header>
 <env:Body>
  <m:login xmlns:m="urn:partner.soap.sforce.com" xmlns:sobj="urn:sobject.partner
.soap.sforce.com">
   <m:username>UserID</m:username>
   <m:password>Password</m:password>
  </m:login>
 </env:Body>
</env:Envelope>
------------ Request end   ----------
2019-10-02 08:31:46,719 ERROR [SOOverallstatusUpdate] client.PartnerClient runOp
eration (PartnerClient.java:332) - Error while calling web service operation: lo
gin, error was: Failed to send request to https://login.salesforce.com/services/
Soap/u/38.0
com.sforce.ws.ConnectionException: Failed to send request to https://login.sales
force.com/services/Soap/u/38.0
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:121)
        at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.jav
a:836)
        at com.salesforce.dataloader.client.PartnerClient$8.run(PartnerClient.ja
va:161)
        at com.salesforce.dataloader.client.PartnerClient$8.run(PartnerClient.ja
va:152)
        at com.salesforce.dataloader.client.PartnerClient.runOperation(PartnerCl
ient.java:328)
        at com.salesforce.dataloader.client.PartnerClient.loginInternal(PartnerC
lient.java:524)
        at com.salesforce.dataloader.client.PartnerClient.login(PartnerClient.ja
va:492)
        at com.salesforce.dataloader.client.PartnerClient.connect(PartnerClient.
java:213)
        at com.salesforce.dataloader.controller.Controller.login(Controller.java
:173)
        at com.salesforce.dataloader.controller.Controller.login(Controller.java
:168)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:128)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:253)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.Validator
Exception: PKIX path building failed: sun.security.provider.certpath.SunCertPath
BuilderException: unable to find valid certification path to requested target
        at sun.security.ssl.Alerts.getSSLException(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
        at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
        at sun.security.ssl.Handshaker.processLoop(Unknown Source)
        at sun.security.ssl.Handshaker.process_record(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source
)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSock
et(SSLConnectionSocketFactory.java:394)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.upgrade
(DefaultHttpClientConnectionOperator.java:192)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.upgrade(
PoolingHttpClientConnectionManager.java:369)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClie
ntExec.java:415)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.
java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java
:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java
:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttp
Client.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttp
Client.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttp
Client.java:107)
        at com.salesforce.dataloader.client.HttpClientTransport.getContent(HttpC
lientTransport.java:133)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:97)
        ... 12 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed:
 sun.security.provider.certpath.SunCertPathBuilderException: unable to find vali
d certification path to requested target
        at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
        at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
        at sun.security.validator.Validator.validate(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Sour
ce)
        ... 33 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to
 find valid certification path to requested target
        at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Sourc
e)
        at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown
 Source)
        at java.security.cert.CertPathBuilder.build(Unknown Source)
        ... 39 more
2019-10-02 08:31:46,891 ERROR [SOOverallstatusUpdate] client.PartnerClient login
Internal (PartnerClient.java:538) - Error while logging in to web service at: ht
tps://login.salesforce.com/services/Soap/u/38.0, error was: Failed to send reque
st to https://login.salesforce.com/services/Soap/u/38.0
com.sforce.ws.ConnectionException: Failed to send request to https://login.sales
force.com/services/Soap/u/38.0
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:121)
        at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.jav
a:836)
        at com.salesforce.dataloader.client.PartnerClient$8.run(PartnerClient.ja
va:161)
        at com.salesforce.dataloader.client.PartnerClient$8.run(PartnerClient.ja
va:152)
        at com.salesforce.dataloader.client.PartnerClient.runOperation(PartnerCl
ient.java:328)
        at com.salesforce.dataloader.client.PartnerClient.loginInternal(PartnerC
lient.java:524)
        at com.salesforce.dataloader.client.PartnerClient.login(PartnerClient.ja
va:492)
        at com.salesforce.dataloader.client.PartnerClient.connect(PartnerClient.
java:213)
        at com.salesforce.dataloader.controller.Controller.login(Controller.java
:173)
        at com.salesforce.dataloader.controller.Controller.login(Controller.java
:168)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:128)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:253)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.Validator
Exception: PKIX path building failed: sun.security.provider.certpath.SunCertPath
BuilderException: unable to find valid certification path to requested target
        at sun.security.ssl.Alerts.getSSLException(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
        at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
        at sun.security.ssl.Handshaker.processLoop(Unknown Source)
        at sun.security.ssl.Handshaker.process_record(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source
)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSock
et(SSLConnectionSocketFactory.java:394)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.upgrade
(DefaultHttpClientConnectionOperator.java:192)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.upgrade(
PoolingHttpClientConnectionManager.java:369)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClie
ntExec.java:415)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.
java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java
:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java
:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttp
Client.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttp
Client.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttp
Client.java:107)
        at com.salesforce.dataloader.client.HttpClientTransport.getContent(HttpC
lientTransport.java:133)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:97)
        ... 12 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed:
 sun.security.provider.certpath.SunCertPathBuilderException: unable to find vali
d certification path to requested target
        at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
        at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
        at sun.security.validator.Validator.validate(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Sour
ce)
        ... 33 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to
 find valid certification path to requested target
        at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Sourc
e)
        at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown
 Source)
        at java.security.cert.CertPathBuilder.build(Unknown Source)
        ... 39 more
2019-10-02 08:31:47,047 FATAL [main] process.ProcessRunner topLevelError (Proces
sRunner.java:238) - Unable to run process SOOverallstatusUpdate
java.lang.RuntimeException: com.sforce.ws.ConnectionException: Failed to send re
quest to https://login.salesforce.com/services/Soap/u/38.0
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:162)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:253)
Caused by: com.sforce.ws.ConnectionException: Failed to send request to https://
login.salesforce.com/services/Soap/u/38.0
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:121)
        at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.jav
a:836)
        at com.salesforce.dataloader.client.PartnerClient$8.run(PartnerClient.ja
va:161)
        at com.salesforce.dataloader.client.PartnerClient$8.run(PartnerClient.ja
va:152)
        at com.salesforce.dataloader.client.PartnerClient.runOperation(PartnerCl
ient.java:328)
        at com.salesforce.dataloader.client.PartnerClient.loginInternal(PartnerC
lient.java:524)
        at com.salesforce.dataloader.client.PartnerClient.login(PartnerClient.ja
va:492)
        at com.salesforce.dataloader.client.PartnerClient.connect(PartnerClient.
java:213)
        at com.salesforce.dataloader.controller.Controller.login(Controller.java
:173)
        at com.salesforce.dataloader.controller.Controller.login(Controller.java
:168)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:128)
        ... 2 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.Validator
Exception: PKIX path building failed: sun.security.provider.certpath.SunCertPath
BuilderException: unable to find valid certification path to requested target
        at sun.security.ssl.Alerts.getSSLException(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
        at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
        at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
        at sun.security.ssl.Handshaker.processLoop(Unknown Source)
        at sun.security.ssl.Handshaker.process_record(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source
)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSock
et(SSLConnectionSocketFactory.java:394)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.upgrade
(DefaultHttpClientConnectionOperator.java:192)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.upgrade(
PoolingHttpClientConnectionManager.java:369)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClie
ntExec.java:415)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.
java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java
:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java
:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttp
Client.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttp
Client.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttp
Client.java:107)
        at com.salesforce.dataloader.client.HttpClientTransport.getContent(HttpC
lientTransport.java:133)
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:97)
        ... 12 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed:
 sun.security.provider.certpath.SunCertPathBuilderException: unable to find vali
d certification path to requested target
        at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
        at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
        at sun.security.validator.Validator.validate(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Sour
ce)
        ... 33 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to
 find valid certification path to requested target
        at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Sourc
e)
        at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown
 Source)
        at java.security.cert.CertPathBuilder.build(Unknown Source)
        ... 39 more
 
VF page not refreshing in LEX when child record created
Create a visualforce page that will override a standard salesforce detail page for a custom object.  On that visualforce page include the detail section as well as related lists.  Configure the view button to use the VF page as an override instead of the standard page.

Now when navigating to the page (view the object) in lightning experience, scroll to one of the related lists.  Click the new button on the related list.  The lightning experience record create popup will appear, you fill out required information and click save.  The child record is successfully inserted into the database but the visualforce override page for the parent does not refresh to show the new child record in the database.  You have to manually refresh the page.  No clue on a workaround to this - seems like a bug.

 
Hi All,

I am using below trigger to update child records. Can someone please convert logic into helper class and call it from trigger. Thanks in advance.
 
trigger ContactUpdate on Account (after update) {
    Map < Id,  Account > mapAccount = new Map < Id, Account >();
    List<Contact> listContact = new List<Contact>();
   
    for(Account acct : trigger.new)
        mapAccount.put(acct.Id, acct);
   
    listContact = [ SELECT MailingStreet, MailingCity, AccountId FROM Contact WHERE AccountId IN : mapAccount.keySet() ];
   
    if ( listContact.size() > 0 ) {
        for ( Contact con : listContact ) {
            con.MailingStreet = mapAccount.get(con.AccountId).BillingStreet;
            con.MailingCity = mapAccount.get(con.AccountId).BillingCity;
        }
        update listContact;
    }
}


 
To use the Bulk API 2.0 for queries, I want to use API version 47.0, but our org is only at version 46.0. How do we upgrade our Sandbox to 47.0?  If that's not possible, how do we know when Salesforce will automatically upgrade our Sandbox?
Hello,

I need to send and receive email in the case view.
Anyone know that I must configure to have the functionality described?

Thanks.
Dear Team ,

Greetings !!!

I am trying to integrate picklist in inline functionality of lightning datatable . Type column is picklist in below code . My controller code are as follows :

({
    doInit : function(component, event, helper) {
        component.set('v.mycolumns', [
            {label: 'Account Name', fieldName: 'Name', type: 'text', editable: true, initialWidth: 750},
            {label: 'Phone', fieldName: 'Phone', type: 'phone', editable: true},
            {label: 'Rating', fieldName: 'Rating', type: 'text', editable: true},
            {label: 'Number Of Employees', fieldName: 'NumberOfEmployees', type: 'number', editable: true},
             {label: 'Type', fieldName: 'Type', type: 'List', editable: true}
        ]);
        
        var action = component.get("c.details");
        action.setCallback(this, function(response) {
            var state = response.getState();
            
            if (state === "SUCCESS") {
                var res = response.getReturnValue();
                component.set("v.mydata", res);
            }
            else if (state === "ERROR") {
                var errors = response.getError();
                if (errors) {
                    if (errors[0] && errors[0].message) {
                        console.log("Error message: " + 
                                 errors[0].message);
                    }
                } 
                else {
                    console.log(response.getReturnValue());
                }
            }
        });
        $A.enqueueAction(action);
    },
    
    saveTable : function(component, event, helper){     
        //var data = component.get("v.mydata");
        var draftValues = event.getParam('draftValues');
        var action = component.get("c.updateDetails");
        action.setParams({lstForm  : draftValues});
        action.setCallback(this, function(response) {
            var state = response.getState();
            
            if (state === "SUCCESS") {
                var res = response.getReturnValue();
                $A.get('e.force:refreshView').fire();
                alert('Updated Successfully...');
            }
            else if (state === "ERROR") {
                var errors = response.getError();
                if (errors) {
                    if (errors[0] && errors[0].message) {
                        console.log("Error message: " + 
                                    errors[0].message);
                    }
                } 
                else {
                    console.log(response.getReturnValue());
                }
            }
        });
        $A.enqueueAction(action);
    }
})

Kindly suggest some solution in order i am able to perform this functionality .

Thanks & Regards
Sachin Bhalerao

Hi,

I'm working in a clean org and have only been doing the steps required for this Superbadge but 5 steps in I'm receiving this error:

Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: HLPIAZTE

As said, I'm using a new org, hence the post here :)
Any help would be appreciated! 

When m click on save button m getting error . Data is getting update . But this error messgae appearing

Error on save button
Dear Team,

Greetings !!!

I am using inline editing using lightning datatable , everything is working fine but output is appearing in disturb format . Kindly have a look on attached image . Plz suggest me some solution.

Thanks & Regards
Sachin Bhalerao


Data Table incorrect outpur
Hi,

Fetch 3rd party app data into salesforce using REST API. Please help on apex class to fetch 3rd party data.

Thanks,
Jayarami

Hi,
I have a test class that deletes custom object record  at the end of day if the value of Grand Total field is 0.

Grand Total field is a roll up field, and is calculated basis the line item value.

Here is my batch class.

global class ProductInterestDeleteBatch implements Database.Batchable<sObject>,Schedulable{
    
    global void execute(SchedulableContext sc){
        ProductInterestDeleteBatch bc = new ProductInterestDeleteBatch();
        database.executeBatch(bc);
    }
    global Database.QueryLocator start(Database.BatchableContext bc){
        return database.getQueryLocator([SELECT Id FROM Product_Interest__c WHERE Grand_Total__c=0]);
    }
    global void execute(Database.BatchableContext bc,List<Product_Interest__c> productInterestList){
        if(!productInterestList.isEmpty()){
            database.delete(productInterestList,false);
        }
    }
    global void finish(Database.BatchableContext bc){
        
    }

}



I need help in writting test class for the same.

We have a custom object which is consuming 80% of org (80 GB) data and we are looking to clean up this data. What is the best way to do this? I can only think of writing a batch job and deleting it but wondering how long does that job run to clean 80 GB of data. Is there any better approach to do this? Appreaciate any help here. 
My company's org has about five triggers more than one existing (after insert, after edit).  I am about to create an (after insert) trigger.  Suggestions as to how I would consolidate or should I create my trigger and add to the pile.  If I should consolidate, how would that look?
I want to create a better searching experience for my customers in the product catalog.  We have thousands of products and our users want to be able to filter search results.  Like on cars.com for example, users can click a checkbox to show just Trucks and another checkbox for just Toyotas, etc. filtering the results down to just what they want to see.  I don't find this capability in SF Product Catalog.  Am I missing something or do we have to code this? 
Guys, I need to know why some objects in Salesforce are shown twice in Object Settings in the profile, such as:
Chatter
Omni Supervisor
Knowledge
Can anyone explain "officially" with some Salesforce documentation or technical criteria?

User-added imageUser-added image
Is it possible to create 1 report with One Parent Object and two related child Object in salesforce.

For example. A is parent and have two related list B and C. 
Need one report with A and B C details . B and C data will be grouped to get total.
Need assistance on knowing what Applications in our SF Org are hitting our API limits
Hello,

I have created a connected app.
How can i expose a custom object for web service ?

thank you for suggestion
I have been trying to get data through a http callout in batch class. its giving max callout time 120000 exceeded errorr any  suggestion on how it can be fixed?
FYI:

Challenge not yet complete in DreamHouse
The page does not have the 'showHeader' attribute set to false


If we look at the note in this module:

Beyond the Basics
Note that both the sidebar and showHeader attribute have no effect in Lightning Experience, and that there’s no way to suppress the Lightning Experience header. Although the default value of showHeader is true, it has no effect in Lightning Experience.
The page still includes some Salesforce style sheets, which let you match Salesforce choices for fonts, size, and so on. To suppress all Salesforce output, add standardStylesheets="false" to remove the styles as well.


We see that showHeader is obsolete and there is no reason to add it.

In the challenge it is specified that the standard SalesForce header should not be displayed:

It must NOT display the standard Salesforce header

I assume the module was created for Classic or did I miss something basic regarding this attribute in LE ? I'm currently on SU19.

with Regards
Filip Poverud
Hi Everyone,
I am doing integration in which I am hitting web service which is giving me some data and I want to store that data into my salesforce objects please suggest me how to do it:

following is the link:
http://intelora.co.in/assessment/eshopdemo.php?keyword=shirt

Please suggest me how to deserialize the response of this service.

 
Hi,

Kindly give suggestions for that,how to automate the process for import the excel from report on particular interval of time.

Thanks
Hello All,

Can anyway assist with the below error ID? 

Thank you.

Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: GQPBWXGO 

We have a client we need to setup a Sharepoint 2016 on premise integration.  All documentation we can find are referring to Sharepoint Online which this is not.  Has anyone successfully done this?
 

We need the ability to add a document at the record level and have it stored in Sharepoint and then be able to retrieve that document from within the record.

// Include and initialize the AJAX toolkit library 
{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")}; 
{!REQUIRESCRIPT("/soap/ajax/19.0/apex.js")};
var idList = {!GETRECORDIDS($ObjectType.Opportunity)}; 
var retURL = window.location.toString();
var proceed = true;
if(idList.length <= 0){
    alert('Please select record(s).');
    proceed = false;
}   
if ((navigator.userAgent.indexOf('MSIE')) >= 0) {
    if(idList.length > 100){
        alert('Only maximum of 100 records can be selected.');
        proceed = false;
    }   
}
if(proceed){
    window.location="/apex/ABSI_Mass_Task_Action?objIds=" + idList + "&retURL=" + retURL;
}
this one not working on SF Lightning 
 
I am getting this error while iterating data under template tag in llightning web component.

<template>
        <lightning-card title="EventWithData" icon-name="standard:logging">
                <div class="slds-m-around_medium">
                        <template if:true={contacts.data}>
                            <p>Gopal Singh</p>
                            <template for:each={contacts} for:item='con'>
                                    <p key={con.id}>{con.Title}</p>
                                </template>
                        </template>
                    </div>
        
        </lightning-card>
    </template>


import { LightningElement, wire } from 'lwc';
import getContactList from '@salesforce/apex/ContactController.getContactList';
export default class EventWithData extends LightningElement {
    //@track selectedContact;
    @wire(getContactList) contacts;    
}
In aura programming model, we could set input variables and invoke the flow like below. flow.startFlow("Delete_Contact_From_Account", inputVariables);
How do we achieve something similar in an LWC Component? please note Lightning web component can now be added in flow screens.
Hi, I'm receving the following message when trying to access my opportunitie's activities "view all" from my desktop, I am a system admin so not sure why this is happening. 
User-added image
I have a a scenario where i'm making changes in vfpage and then redirecting page to  previous page(lightning detail page) but changes doesn't reflect immediately but i need to refresh the detail page in order to see changes . Why is this so ? and how to overcome this .(It is working fine in classic but in lightning i need to refresh) Pls help .
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();
        }
    }
       
})