• Aaron Bailey 5
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
I am trying to use the afterRender event in a custom component (below is the component markup, js handler and the error I am seeing). I have taken out all the code in the handler but I still can't get around the error. I also don't know what parameter I should be setting for value in the component markup for the handler. The documentation around afterRender is pretty sparse so wanted to see if someone in the group could help. If I remove the afterRender handler, the component shows without error.
 
Thank you.
 
<!-- COMPONENT MARKUP -->
<aura:handler name="afterRender" action="{!c.afterRender}" value="{!this}"/>
 
//js controller afterRender
afterRender: function (component, helper) {
                       
        this.superAfterRender();           
       
    }

----- ERROR MESSAGE -----
Uncaught Error in $A.getCallback() [Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details.
Action failed: forceChatter:lightningComponent$controller$doInit [Cannot read property 'b' of undefined]]
  • March 02, 2017
  • Like
  • 0
I'm trying to enable spam filtering on a Web-to-Lead form using the Create a Web-to-Lead Form.

This was quite tricky to start with because the pop-up to add an API Key Pair disappears if you click away from it! I managed to manually enter the secret as it was impossible to copy and paste it. Then I made a typo and found it was impossible to edit the key, as the page for editing keys is broken. The only way was to delete the key and add it again through the disappearing pop-up. 

Now I've included the form in our site, but the recaptcha does nothing - if I ignore and click submit, the form submits to https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8 anyway which is just a blank page. 

I know this is new functionality but it doesn't seem like it is working at all?
I am implementing lightning design system and bootstrap at the same time in lightning component, But unable to get the desired UI in responsive mode. 
Can i use both in lightning component.
Hello,

I've been trying to put together an APEX code library for integrations between Salesforce and Cvent's SOAP API.  I'm having some problems with the SOAP envelope generated by one of the API calls.  It's specifying the wrong namespace at one of the element nodes causing Cvent to fail to deserialize the envelope correctly.

I've tried tweaking the auto-generated classes in APEX (playing around with the apex_schema_type_info and Ids_type_info) to get the correct namespace at the right spot, but so far have had no luck.

Here is the API call I'm trying to make:
//Create an array and store the ids in it
CventWebServiceschemas.IdArray idArray = new CventWebServiceschemas.IdArray();
idArray.Id = updatedResult.Id; //updatedResult is an array of IDs returned from a previous API call

//Make API call to retrieve events
CventWebServiceschemas.RetrieveResult retrieveResult = ws.Retrieve_x('Event' ,idArray);
System.debug('retrieveRes: ' + retrieveResult);

Here are the APEX relevant classes generated when reading in the WSDL:

public CventWebServiceschemas.RetrieveResult Retrieve_x(String ObjectType,CventWebServiceschemas.IdArray Ids) {
            CventWebService.Retrieve_element request_x = new CventWebService.Retrieve_element();
            request_x.ObjectType = ObjectType;
            request_x.Ids = Ids;
            CventWebService.RetrieveResponse_element response_x;
            Map<String, CventWebService.RetrieveResponse_element> response_map_x = new Map<String, CventWebService.RetrieveResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://api.cvent.com/2006-11/Retrieve',
              'http://api.cvent.com/2006-11',
              'Retrieve',
              'http://api.cvent.com/2006-11',
              'RetrieveResponse',
              'CventWebService.RetrieveResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.RetrieveResult;
        }


public class Retrieve_element {
        public String ObjectType;
        public CventWebServiceschemas.IdArray Ids;
        private String[] ObjectType_type_info = new String[]{'ObjectType','http://api.cvent.com/2006-11',null,'1','1','false'};
        private String[] Ids_type_info = new String[]{'Ids','http://schemas.cvent.com/api/2006-11',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://api.cvent.com/2006-11','true','false'};
        private String[] field_order_type_info = new String[]{'ObjectType','Ids'};
    }

public class IdArray {
        public String[] Id;
        private String[] Id_type_info = new String[]{'Id','http://schemas.cvent.com/api/2006-11',null,'0','-1','false'};
        private String[] apex_schema_type_info = new String[]{'http://schemas.cvent.com/api/2006-11','true','false'};
        private String[] field_order_type_info = new String[]{'Id'};
    }


public class RetrieveResponse_element {
        public CventWebServiceschemas.RetrieveResult RetrieveResult;
        private String[] RetrieveResult_type_info = new String[]{'RetrieveResult','http://schemas.cvent.com/api/2006-11',null,'0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://api.cvent.com/2006-11','true','false'};
        private String[] field_order_type_info = new String[]{'RetrieveResult'};
    }


The issue I'm having is with the namespace on the idArray in the SOAP envelope.  When I create the API call through C# or .Net WebService Studio, it creates an envelope in the expected format below with the https://schemas.cvent.com/api/2006-11 specified on the <Ids> element.

...
<soap:Body>
  <Retrieve xmlns="http://api.cvent.com/2006-11">
    <ObjectType>Event</ObjectType>
      <Ids xmlns="http://schemas.cvent.com/api/2006-11">
        <Id>7A71F7AC-2EDC-4462-8CF6-46E7CB7BD763</Id>
      </Ids>
  </Retrieve>
</soap:Body>
...

When I do a retrieve call using the APEX generated classes, it's creating the below envelope, which is failing to deserialize since the <Ids> element is inheriting the http://api.cvent.com/2006-11 namespace.

...
<env:Body>
  <Retrieve xmlns="http://api.cvent.com/2006-11">
      <ObjectType>Event</ObjectType>
      <Ids>
        <Id xmlns="http://schemas.cvent.com/api/2006-11">7A71F7AC-2EDC-4462-8CF6-46E7CB7BD763</Id>
      </Ids>
  </Retrieve>
</env:Body>
...

Please let me know if you need any more information (or the full generated APEX classes and full APEX code).  I would have provided both but didn't see any way to upload files.