• Giorgos Galaios
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies
I have overriden new Account and Edit Account standard actions with some custom Lightning Components. On console navigation apps i want to close some tabs on Account save and then open a new tab to the record id just created. But this does not seem to work and i do not understand the reason why.
 
navigateTo: function(component, recId) {
        //First determine whether navigation is Console or Standard
        var workspaceAPI = component.find("workspace");
        workspaceAPI.isConsoleNavigation().then(function(response) {
            if (response) { //navigation is console
                //Open a new tab with the record
                workspaceAPI.openTab({
                    recordId: recId,
                    focus: true,
                    overrideNavRules: true
                }).catch(function(error) {
                    console.log('error' +error);
                });
                workspaceAPI.getAllTabInfo().then(function(response) {
                    console.log(response);
                    for (var i=0; i<=response.length; i++) {
                        if ((response[i].title == 'Loading...') || (response[i].title == 'New Account') || (response[i].title == 'Νέος πελάτης') || (response[i].title == 'Φόρτωση...')) {
                            console.log(response[i].title);
                            workspaceAPI.closeTab({tabId: response[i].tabId});
                        }
                    }
                })
                .catch(function(error) {
                    console.log(error);
                });
            } else { //Standard navigation
                var navEvt = $A.get("e.force:navigateToSObject");
                navEvt.setParams({
                    "recordId": recId
                });
                navEvt.fire();
                window.setTimeout(
                    $A.getCallback(function() {
                        $A.get('e.force:refreshView').fire();
                    }), 2000
                );
            }
        })
    },

The issue is, new tab opens, the tabs i want to close get closed, but focus is not on the opened tab by my code. It is one tab left from the tab opened by my code. Any Ideas ?
We have the following code:
System.debug(Limits.getHeapSize());
String one = '1234567890'.repeat(myRepeater);
System.debug(Limits.getHeapSize());
String oneLine = '1234567890';
System.debug(Limits.getHeapSize());
integer count = 1;
while(one.indexOf(oneLine)>-1){
    System.debug('Count is: ' + count);
    System.debug(Limits.getHeapSize());
    System.debug('one is before: ' + one);
    one = one.subStringAfter(oneLine);
    System.debug('one is after: ' + one);
    System.debug(Limits.getHeapSize());
    count = count+1;
}
System.debug('Finish: ' + Limits.getHeapSize());

When myRepeater is less than 270000, in fact if it is a bit less than Heap Size/20, then the procedure moves on, and we get CPU time limit exception which is expected.

Heap size/20 is calculated as:
270000 * 10 (length of '123456789') = 2700000 * 2 = 5400000 < Governor Limit

But if it is larger, although when starting Heap size is lower than this limit and despite the fact that when in progress, heap size gets less, there is a point in the start that we hit the subStringAfter Heap size limit.
Is this logical?
Has anybody get into this situation?
Since size of string gets reduced, as well as heap size seems to get reduced, shouldn't it be expected not to hit the limit?
 
I would like when a user makes an update on the status of a Duplicate Record Set to show a custom confirmation message. Is there any possible way this could be achieved? Is i see, i cannot create custom actions/buttons in this object. Even with a custom lightning component, i don't see that there is ability to customize this object.
For our SOAP callouts, we need to be using a Certificate which is part of the following certificate chain: Root: CN=DigiCert Global Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US
Intermediate: CN=GeoTrust RSA CA 2018,OU=www.digicert.com,O=DigiCert Inc,C=US, issued by: CN=DigiCert Global Root CA,OU=www.digicert.com,O=DigiCert Inc,C=US
SSL certificate: CN=our.domain.gr,OU=IT DEPARTMENT,O=OUR ORG.,L=ATHENS,C=GR, issued by: CN=GeoTrust RSA CA 2018,OU=www.digicert.com,O=DigiCert Inc,C=US
Following instructions on how to import certificates from our keystore, and how to treat certificate chains, we have managed to import our SSL certificate in Salesforce.
However, when we are using this certificate for our APEX calls, we are getting error: IO Exception: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
It has been confirmed that no calls towards are server are being made from Salesforce, so this is not an error returned by the server, but from Salesforce.
All investigation up to now suggests that the issue is related to the intermediate certificate which is not included in the listed of trusted root certificates of Salesforce. How can we overcome this behavior? How can we get the intermediate certificate included in the trusted by Salesforce certificates? Thanks in advance