• Nick Worth
  • NEWBIE
  • 0 Points
  • Member since 2014
  • Web Applications Developer
  • Rapid Recovery


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi there,

I'd like to update my LinkedIn profile in my settings but the message "Wrong URL format" appears even if I respect the default format.
Any idea?

Thanks,
Fred
 
Hi There-

We are using Pardot for marketing automation and currrently the sync works from Pardot to Salesforce automatically and from Salesforce to Pardot with a button click that executes a java scrpit that pushes lead basic data to our Pardot instance

**
window.location = 'https://blablabla/email/{!Lead.Email}?lead_id={!Lead.Id}&sessionid={!$Api.Session_ID}&serverurl={!$Api.Partner_Server_URL_90}&redirect_location='+window.location
**
Im requesting for your help to translate this JS to apex which will work every time 1 or more leads are created in salesforce?
Please assist

Maor
Hi There-

We are using Pardot for marketing automation and currrently the sync works from Pardot to Salesforce automatically and from Salesforce to Pardot with a button click that executes a java scrpit that pushes lead basic data to our Pardot instance

**
window.location = 'https://blablabla/email/{!Lead.Email}?lead_id={!Lead.Id}&sessionid={!$Api.Session_ID}&serverurl={!$Api.Partner_Server_URL_90}&redirect_location='+window.location
**
Im requesting for your help to translate this JS to apex which will work every time 1 or more leads are created in salesforce?
Please assist

Maor
I have an xml file which is being loaded into Salesforce as a document using the input file tag (VF Page), I am able to access the document and get the contents. I am assigning the contents to a DOM.Document object, but when I am trying to traverse down to child objects it is not giving the values and its always null.

This is the body of text file

<?xml version="1.0" encoding="UTF-8"?>
<Process>
   <SalesProcess Name="Test Process">
      <Phase Name="Test" Order="1" Duration="0">
           <Goal Name="Test" Order="1" Confidence="0">
                <Description>Test Goal</Description>
           </Goal>
     </Phase>
   </SalesProcess>
</Process>

Method Parsing the document

public void loadAttachment(){
        String paramvalue = EncodingUtil.base64Encode(attach.body);
        Blob afterblob = EncodingUtil.base64Decode(paramvalue);
        attachmentBody = afterblob.tostring();
        Dom.Document document = new Dom.Document();
        document.load(attachmentBody);
        Dom.Xmlnode rootnode = doc.getrootElement();
        for(Dom.XMLNode child : rootnode.getChildElements()) {
           System.debug(child.getName()); // This value is blank.
       
        }
   }

When I debug I am getting the following string as root node

XMLNode[ELEMENT,Process,null,null,null,[XMLNode[ELEMENT,SalesProcess,null,[common.apex.api.dom.XmlNode$Attribute@6393be55, common.apex.api.dom.XmlNode$Attribute@78b4f185, common.apex.api.dom.XmlNode$Attribute@2f5c90ac],null,[XMLNode[ELEMENT,Phase,null,[common.apex.api.dom.XmlNode$Attribute@661e247e, common.apex.api.dom.XmlNode$Attribute@44ee0092, common.apex.api.dom.XmlNode$Attribute@65679498],null,[XMLNode[ELEMENT,Goal,null,[common.apex.api.dom.XmlNode$Attribute@734cbb2a, common.apex.api.dom.XmlNode$Attribute@3293fd89, common.apex.api.dom.XmlNode$Attribute@11ea4750],null,[XMLNode[ELEMENT,Description,null,null,null,[XMLNode[TEXT,null,null,null,null,null,Test Goal,]],null,]],null,]],null,]],null,]],null,]

I printed the document.tostring() and the string is matching the  xml, but i am not able to access the document values and it gives me a weird string when try to access the root node, if i try to access root node child i get a blank value.