• Dima Kryvyi
  • NEWBIE
  • 15 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies
We've faced an issue with custom ligtning components wrapped up with Visualforce page. It takes Visualforce page around 3-5 seconds to start loading the lightning part (when the page itself is there). Here's VF page:
<apex:outputPanel id="viewPanel" rendered="{!$User.UIThemeDisplayed == 'Theme3'}">
    <apex:includeLightning />
    <div id="component" />
        <script>
            var myUserContext = "{!$User.UITheme}";
            $Lightning.use("sff:SFF", function() {
                $Lightning.createComponent("sff:ReportsTab", {
                        label: "List of Reports",
                        userContext: myUserContext,
                    },
                    "component",
                    function(cmp) {});
            });
        </script>
    </apex:outputPanel>
</apex:page>
That's what I see in Chrome console. 'A' - VF part emerges, 'B' - Lightning is visualized and nothing in between.

User-added image

Any ideas/hints on how to boost that loading? Thanks
Hi all,

I've tried to use lightning:fileUpload component on a community page.
It works just fine for a logged in user and it fails under the guest user.
Browser console gives me this "The action you performed was invalid for your session. Please refresh your page and try again"

User-added image

I've checked debug logs for that user and found no details on that error.
I've tried to give all the permissions in the guest user profile, enable all the options in the community setup, etc.. no luck.

Any Ideas, guys? Is it generally doable?
 
I have completed all the DEV2 required SuperBadges (apex, integration, lightning cmps, advanced apex).
Now I have to link my Trailhead Account with my Webassessor Account as it's required for the DEVII certification. 
I'm expecting to receive some email with the expanations on how to make that linkage and I'm not sure what email address to check.
After the latest changes in the Trailhead UI there is no direct way to see/change your email address.

The only sections I see in the trailhead settings are:
Salesforce Hands-on Orgs: all the connected orgs
Salesforce Login: I see an email there from the connected gmail account, but that's not the one I started Trailblazing with
Social Login: with Facebook, Linkedin, Google+ rows, where Li & G+ are connected to my actual accounts)

I've also found a this link: http://certification.force.com/pkb/articles/Public_KB/Trailhead-Account-Email with such an expanation:
"When you signed up for your Trailhead account, you used either your Salesforce login or a social account to create it. Whichever method you used to create your Trailhead account, the email address from that account becomes your email address associated to your Trailhead account. You can view which Salesforce and/or social accounts you have connected to your Trailhead account from your profile settings."

So my question are:
- Is there a way to find out the exact email address which is associated with my Trailhead account?
- What if that's an old email address, which doesn't exist anymore?
- Is there a way to link Trailhead to Webassessor without receiving that "special" email from trailhead?
- Is there someone who have already done the linkage?

P.S. I've contacted Trailhead support, though the only thing I got from them was this link to the instructions to merge account.
But I don't have two Accounts to megre.
Hi All,
I'm getting this error on Step 2 of Lightning Component Framework Specialist Superbadge.
User-added image
BoatSearchFormHelper.js which gets the name of the UITheme and checks whether 'e.force:createRecord' event is supported by the current context (one.app). 
renderNewButton: function (component) {
        var action = component.get('c.getUITheme');
        action.setCallback(this, function (response) {
            if (response.getState() === 'SUCCESS') {
                if (response.getReturnValue() == 'Theme4d' && $A.get('e.force:createRecord')) {
                    component.set('v.showNewButton', true);
                }
            }
        });
        $A.enqueueAction(action);
    }
So, if both conditions return true, then the 'showNewButton' attribute is set to 'true' and the 'New' button is rendered in the component markup:
<div class='{!v.showNewButton ? '' : 'slds-hide'}'>
    <lightning:button variant='neutral' label='New' onclick='{!c.createBoat}'/>
</div>
I also tried such an option with aura:renderIf:
<aura:renderIf isTrue='{!v.showNewButton}'>
    <lightning:button variant='neutral' label='New' onclick='{!c.createBoat}'/>
    <aura:set attribute='else'>
    </aura:set>
 </aura:renderIf>
Here is the phase from the challenge: "The form’s controller checks whether the event.force:createRecord event is supported by a standalone app and either shows or hides the New button according to best practices."

Does anyone know the way to check that?


 
We've faced an issue with custom ligtning components wrapped up with Visualforce page. It takes Visualforce page around 3-5 seconds to start loading the lightning part (when the page itself is there). Here's VF page:
<apex:outputPanel id="viewPanel" rendered="{!$User.UIThemeDisplayed == 'Theme3'}">
    <apex:includeLightning />
    <div id="component" />
        <script>
            var myUserContext = "{!$User.UITheme}";
            $Lightning.use("sff:SFF", function() {
                $Lightning.createComponent("sff:ReportsTab", {
                        label: "List of Reports",
                        userContext: myUserContext,
                    },
                    "component",
                    function(cmp) {});
            });
        </script>
    </apex:outputPanel>
</apex:page>
That's what I see in Chrome console. 'A' - VF part emerges, 'B' - Lightning is visualized and nothing in between.

User-added image

Any ideas/hints on how to boost that loading? Thanks
I have completed all the DEV2 required SuperBadges (apex, integration, lightning cmps, advanced apex).
Now I have to link my Trailhead Account with my Webassessor Account as it's required for the DEVII certification. 
I'm expecting to receive some email with the expanations on how to make that linkage and I'm not sure what email address to check.
After the latest changes in the Trailhead UI there is no direct way to see/change your email address.

The only sections I see in the trailhead settings are:
Salesforce Hands-on Orgs: all the connected orgs
Salesforce Login: I see an email there from the connected gmail account, but that's not the one I started Trailblazing with
Social Login: with Facebook, Linkedin, Google+ rows, where Li & G+ are connected to my actual accounts)

I've also found a this link: http://certification.force.com/pkb/articles/Public_KB/Trailhead-Account-Email with such an expanation:
"When you signed up for your Trailhead account, you used either your Salesforce login or a social account to create it. Whichever method you used to create your Trailhead account, the email address from that account becomes your email address associated to your Trailhead account. You can view which Salesforce and/or social accounts you have connected to your Trailhead account from your profile settings."

So my question are:
- Is there a way to find out the exact email address which is associated with my Trailhead account?
- What if that's an old email address, which doesn't exist anymore?
- Is there a way to link Trailhead to Webassessor without receiving that "special" email from trailhead?
- Is there someone who have already done the linkage?

P.S. I've contacted Trailhead support, though the only thing I got from them was this link to the instructions to merge account.
But I don't have two Accounts to megre.
I'm at Challenge 6 and I'm stuck. I've tested that my code produces the Chatter post to the group, and my AnnouncementQueueable class implements Queuable. I've implemented the excecute() method. But still I get this error:

"Challenge Not yet complete... here's what's wrong: 
Ensure that you implement the Queueable interface in the announcementsQueueable class."

User-added image

What am I doing wrong?
Hi All,
I'm getting this error on Step 2 of Lightning Component Framework Specialist Superbadge.
User-added image
BoatSearchFormHelper.js which gets the name of the UITheme and checks whether 'e.force:createRecord' event is supported by the current context (one.app). 
renderNewButton: function (component) {
        var action = component.get('c.getUITheme');
        action.setCallback(this, function (response) {
            if (response.getState() === 'SUCCESS') {
                if (response.getReturnValue() == 'Theme4d' && $A.get('e.force:createRecord')) {
                    component.set('v.showNewButton', true);
                }
            }
        });
        $A.enqueueAction(action);
    }
So, if both conditions return true, then the 'showNewButton' attribute is set to 'true' and the 'New' button is rendered in the component markup:
<div class='{!v.showNewButton ? '' : 'slds-hide'}'>
    <lightning:button variant='neutral' label='New' onclick='{!c.createBoat}'/>
</div>
I also tried such an option with aura:renderIf:
<aura:renderIf isTrue='{!v.showNewButton}'>
    <lightning:button variant='neutral' label='New' onclick='{!c.createBoat}'/>
    <aura:set attribute='else'>
    </aura:set>
 </aura:renderIf>
Here is the phase from the challenge: "The form’s controller checks whether the event.force:createRecord event is supported by a standalone app and either shows or hides the New button according to best practices."

Does anyone know the way to check that?


 
Step 7 - Synchronize Salesforce project data with Square Peg's external billing system

I'm getting an error message when triggering the SOAP call from the UI via record update:

System.CalloutException: IO Exception: External server did not return any content

When I import the WSDL into SOAP UI and send the same package body, I receive this message:
HTTP/1.1 500 
Server: Cowboy
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 10 Jul 2017 17:58:08 GMT
Via: 1.1 vegur
Proxy-Connection: Keep-Alive
Connection: Keep-Alive

{"timestamp":1499709488068,"status":500,"error":"Internal Server Error","exception":"java.lang.OutOfMemoryError","message":"unable to create new native thread","path":"/ws"}

Does this mean that the herokuapp needs to be restarted or something? I've found a couple of posts with sample code for this challenge and with a few small differences, mine matches from what I can tell. Here's the code I'm using:

ProjectTrigger
trigger ProjectTrigger on Project__c (after update) {
    //Call the Billing Service callout logic here

    if (trigger.isAfter && trigger.isUpdate) {
        BillingCalloutService.callBillingService(Trigger.new, Trigger.newMap, Trigger.old, Trigger.oldMap);
    }

}

BillingCalloutService
public class BillingCalloutService {
    //Implement business and callout logic methods here
    public static void callBillingService(List<Project__c> newList, Map<Id, Project__c> newMap,
            List<Project__c> oldList, Map<Id, Project__c> oldMap) {

        if(!newList.isEmpty()) {
            Project__c project = newList[0];
            if (project.Status__c == 'Billable' && oldMap.get(project.Id).Status__c != 'Billable') {
                // Get Service Credentials from custom settings
                ServiceCredentials__c credentials = ServiceCredentials__c.getInstance('BillingServiceCredential');
                billProject(project.ProjectRef__c, project.Billable_Amount__c, credentials.Username__c, credentials.Password__c);
            }
        }
    }

    @Future(callout=true)
    private static void billProject(String projectRef, Decimal billAmount, String username, String password) {

        BillingServiceProxy.project project = new BillingServiceProxy.project();
        project.projectRef = projectRef;
        project.billAmount = billAmount;
        project.username = username;
        project.password = password;

        BillingServiceProxy.InvoicesPortSoap11 invoiceCall = new BillingServiceProxy.InvoicesPortSoap11();
        // Make the callout and update the Status if callout is successful
        String response = invoiceCall.billProject(project);

        List<Project__c> projects = new List<Project__c>();
        if(response != null && response.equalsIgnoreCase('OK')) {

            projects = [
                    Select Id, Status__c
                    From Project__c
                    Where ProjectRef__c = :projectRef
            ];
            if(!projects.isEmpty()) {
                projects[0].Status__c = 'Billed';
                update projects;
            }
        }

    }
}

BillingServiceProxy
//Generated by wsdl2apex

public class BillingServiceProxy {
    public class billProjectRequest_element {
        public BillingServiceProxy.project project;
        private String[] project_type_info = new String[]{'project','http://salesforce.com/th/invoice-web-service',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://salesforce.com/th/invoice-web-service','true','false'};
        private String[] field_order_type_info = new String[]{'project'};
    }
    public class project {
        public String username;
        public String password;
        public String projectRef;
        public Double billAmount;
        private String[] username_type_info = new String[]{'username','http://salesforce.com/th/invoice-web-service',null,'1','1','false'};
        private String[] password_type_info = new String[]{'password','http://salesforce.com/th/invoice-web-service',null,'1','1','false'};
        private String[] projectRef_type_info = new String[]{'projectRef','http://salesforce.com/th/invoice-web-service',null,'1','1','false'};
        private String[] billAmount_type_info = new String[]{'billAmount','http://salesforce.com/th/invoice-web-service',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://salesforce.com/th/invoice-web-service','true','false'};
        private String[] field_order_type_info = new String[]{'username','password','projectRef','billAmount'};
    }
    public class billProjectResponse_element {
        public String status;
        private String[] status_type_info = new String[]{'status','http://salesforce.com/th/invoice-web-service',null,'1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://salesforce.com/th/invoice-web-service','true','false'};
        private String[] field_order_type_info = new String[]{'status'};
    }
    public class InvoicesPortSoap11 {
        public String endpoint_x = 'http://sb-integration-bs.herokuapp.com:80/ws';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        private String[] ns_map_type_info = new String[]{'http://salesforce.com/th/invoice-web-service', 'BillingServiceProxy'};
        public String billProject(BillingServiceProxy.project project) {
            BillingServiceProxy.billProjectRequest_element request_x = new BillingServiceProxy.billProjectRequest_element();
            request_x.project = project;
            BillingServiceProxy.billProjectResponse_element response_x;
            Map<String, BillingServiceProxy.billProjectResponse_element> response_map_x = new Map<String, BillingServiceProxy.billProjectResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              '',
              'http://salesforce.com/th/invoice-web-service',
              'billProjectRequest',
              'http://salesforce.com/th/invoice-web-service',
              'billProjectResponse',
              'BillingServiceProxy.billProjectResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.status;
        }
    }
}

Any ideas what I'm doing wrong here? Any assistance would be most appreciated!

Thanks!