• AMDaw
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi All,

Long time reader, first time poster. Searched for any leads on this, but couldn't find much. If i'm missing something, please let me know ^_^.

I'm trying to create a case assignment rule based on the "To:" field of the attached EmailMessage record. However, this doesn't seem to be an option declaratively, and creating a trigger using the IDE doesn't list the EmailMessage object as an option. Is this just because that's dependent on Email-to-Case being enabled so it wasn't prepopulated, and it should still be doable, or is it going to restrict me because I'm not supposed to be interacting with that sObject (if that's the proper term).

I apologize in advance if this is a pointless comment as the answer is obvious and I've been missing it, but I've been going over this all day and I just can't see it.

Thanks,

Adam
  • November 07, 2008
  • Like
  • 0

Hi.

 

I'm trying to access apex clases via PHP. But got error - 

 

Fatal error: Uncaught SoapFault exception: [soapenv:Client] Element {}item invalid at this location in /home/oleg/sites/site.php:30 Stack trace: #0 [internal function]: SoapClient->__call('Test', Array) #1 /home/oleg/sites/site.php(30): SoapClient->Test() #2 {main} thrown in /home/oleg/sites/site.php on line 30

 

Apex Code:

 

 

global class Test1 {

webservice static String Test2() {
return 'Got it';

}

 

 PHP Code:

 

 

<html>
<head>
<title> PHP SalesForce Test </title>
</head>
<body>

<?php
ini_set("soap.wsdl_cache_enabled", "0");
require_once('salesforceAPI/SforcePartnerClient.php');
require_once('salesforceAPI/SforceHeaderOptions.php');

$sfdc = new SforcePartnerClient();
$SoapClient = $sfdc->createConnection('salesforceAPI/wsdl.xml');

$loginResult = false;
$loginResult = $sfdc->login('login@login', 'password' . 'token');
$parsedURL = parse_url($sfdc->getLocation());

define ("_SFDC_SERVER_", substr($parsedURL['host'],0,strpos($parsedURL['host'], '.')));
define ("_WS_NAME_", 'Test1');
define ("_WS_WSDL_", _WS_NAME_ . '.xml');
define ("_WS_ENDPOINT_", 'https://' . _SFDC_SERVER_ . '.salesforce.com/services/wsdl/class/' . _WS_NAME_);
define ("_WS_NAMESPACE_", 'http://soap.sforce.com/schemas/class/' . _WS_NAME_);

$client = new SoapClient(_WS_WSDL_);
$sforce_header = new SoapHeader(_WS_NAMESPACE_, "SessionHeader", array("sessionId" => $sfdc->getSessionId()));
$client->__setSoapHeaders(array($sforce_header));

$responce = $client->Test2();

echo "Message is " . $response;

?>
</body>
</html>

 

 Thank you.

 

 

 

Hi All,

Long time reader, first time poster. Searched for any leads on this, but couldn't find much. If i'm missing something, please let me know ^_^.

I'm trying to create a case assignment rule based on the "To:" field of the attached EmailMessage record. However, this doesn't seem to be an option declaratively, and creating a trigger using the IDE doesn't list the EmailMessage object as an option. Is this just because that's dependent on Email-to-Case being enabled so it wasn't prepopulated, and it should still be doable, or is it going to restrict me because I'm not supposed to be interacting with that sObject (if that's the proper term).

I apologize in advance if this is a pointless comment as the answer is obvious and I've been missing it, but I've been going over this all day and I just can't see it.

Thanks,

Adam
  • November 07, 2008
  • Like
  • 0