• Stefaan Somers
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Cegeka

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
We do our communication with Salesfore not directly, but through Enterprise Solution Bus. So we don't need to login anymore to salesforce, but just the API-request to the ESB who will do his communication with Salesforce. But the ESB needs a special soap-header.
<soapenv:Header> 
<ns1:header soapenv:actor=“http://schemas.xmlsoap.org/soap/actor/next” soapenv:mustUnderstand=“0” xmlns:ns1=“http://www.xxxx.com/xsd/esb/ESBCommonTypes”> <ns1:message_type>SF_ENTPRISE_Interface</ns1:message_type> <ns1:version>01.80</ns1:version> 
<ns1:source_entity>xxxx</ns1:source_entity> <ns1:source_application>xxx</ns1:source_application> <ns1:destination_entity>xxx</ns1:destination_entity> <ns1:destination_application>xxx</ns1:destination_application> <ns1:message_id></ns1:message_id>
</ns1:header> 
</soapenv:Header>


So I try to modify SfBaseClient, the method
private function setHeaders($call=NULL) { ...... 
$soapHeader=new SoapHeader('http://www.leaseplan.com/xsd/esb/ESBCommonTypes', 'header', array ( 
 'client'=> 'test', 'defaultNamespace'=> 'test',
 'message_type' => 'xxxx',
 'version' => '01.80',
 'source_entity' => 'xxx'
, 'source_application' => 'LNOTES',
 'destination_entity'=> 'xx',
 'destination_application'=> 'SFxxxBE' )); 
array_push($header_array, $soapHeader); 
$this->sforce->__setSoapHeaders($header_array);


But when doing this, I always get
Fatal error: SoapClient::__setSoapHeaders(): Invalid SOAP header in C:\var\sourceRepositories\salesforce\Force.com-Toolkit-for-PHP-master\soapclient\SforceBaseClient.php on line 337
How can I obtain this functionality

Hi - hopefully a simple question.

 

I'm trying to create a custom button to send a template email to the lead.

 

I've found some relevant board posts but they all seem for more complicated uses - I'm simply looking for a button that would mimic the following:

 

Activity:Send An Email

Select Template

[template id]

Send

 

Does that make sense?  I'm familiar with how to create buttons, I just can't figure out the syntax.