• bvoy
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

We have different notification email templates set up to fire for new cases. (Customize -> Cases -> Assignment Rules -> name of our standard set -> Edit for the given assignment rule entry.) Different kinds of cases get sent to different queues. We want the queue members to get notification emails, and this setup has worked fine for that for our Web-to-Case forms thus far.

 

I'm now transitioning us to using the PHP API instead (a few reasons, spam control being the primary one) and have things working. I'm using the following code just before creating the case to make sure the assignment rules are triggered:

 

$header = new AssignmentRuleHeader('', true);
$con->setAssignmentRuleHeader($header);

This seems to work well. Cases are assigned to the correct queues. Except email notifications are no longer being sent out, even though the queue ownership assignment is working fine. Any ideas why this might be? Is there another header flag I can set?

 

The workaround would be to have to create a corresponding workflow for every queue, but I figured I'd check if someone knows of a way to keep using just the Assignment Rules settings to make sure notifications get sent.

  • November 22, 2013
  • Like
  • 0

I'm trying to return a picklist field to a truly empty/null state, that is, --None-- should be the selection in the Salesforce UI.

 

Can't seem to find a way. Setting the picklist field on the update object to an empty string, null, or boolean false leaves it unchanged after the update. Passing actual strings such as "true" or "null" just treats it as a normal string, putting it in as an inactive picklist value.

 

Is there a way to do this with the API?

  • March 11, 2013
  • Like
  • 0

Hi folks,

 

New to Apex development. I've written an Apex method to check data (zipcode) on new cases. If they're in the U.S. and there's a match with a group of accounts, it fills in a lookup field. It's called by a simple trigger that passes on all cases before insert & update.

 

I've learned in doing this that Apex does not even create an empty variable for an empty field, whether it's passed in from Trigger.new (the cases) or a SOQL query (the accounts). Most of the fields this method uses aren't and can't be required. So both in looping through accounts that may not have zipcodes filled in, and in dealing with cases that don't have the information I'm testing for filled in, this method has a big problem with running into null pointer exceptions due to empty fields.

 

For now, I'm simply catching any null pointer errors to make sure this doesn't stop any records from being saved and edited, but this seems like a terrible way of doing things. Does Apex have a way of testing if a field/variable exists? Or is there some other way of dealing with this I'm missing? I suppose I could simply set up try/catch for each individual variable as a way of setting "this variable exists" booleans, but again, I'm used to the idea that there should be a better way.

 

Thanks,

 

-Ben

  • February 26, 2013
  • Like
  • 0

Is there a way to create a custom Web To Lead Form using a custom object?

I am not talking about LEADS object.

We have a custom object called - Candidates. I want the data send from Web Form (Careers section) should be send directly into Candidates Custom object.

The Web Form, is PHP based.

What do I need to provide our PHP Developers, so they can program the Web form in such a way, that the data is send over to the Candidates object, instead of LEADS object?

 

thanks

 

We have different notification email templates set up to fire for new cases. (Customize -> Cases -> Assignment Rules -> name of our standard set -> Edit for the given assignment rule entry.) Different kinds of cases get sent to different queues. We want the queue members to get notification emails, and this setup has worked fine for that for our Web-to-Case forms thus far.

 

I'm now transitioning us to using the PHP API instead (a few reasons, spam control being the primary one) and have things working. I'm using the following code just before creating the case to make sure the assignment rules are triggered:

 

$header = new AssignmentRuleHeader('', true);
$con->setAssignmentRuleHeader($header);

This seems to work well. Cases are assigned to the correct queues. Except email notifications are no longer being sent out, even though the queue ownership assignment is working fine. Any ideas why this might be? Is there another header flag I can set?

 

The workaround would be to have to create a corresponding workflow for every queue, but I figured I'd check if someone knows of a way to keep using just the Assignment Rules settings to make sure notifications get sent.

  • November 22, 2013
  • Like
  • 0

Hi folks,

 

New to Apex development. I've written an Apex method to check data (zipcode) on new cases. If they're in the U.S. and there's a match with a group of accounts, it fills in a lookup field. It's called by a simple trigger that passes on all cases before insert & update.

 

I've learned in doing this that Apex does not even create an empty variable for an empty field, whether it's passed in from Trigger.new (the cases) or a SOQL query (the accounts). Most of the fields this method uses aren't and can't be required. So both in looping through accounts that may not have zipcodes filled in, and in dealing with cases that don't have the information I'm testing for filled in, this method has a big problem with running into null pointer exceptions due to empty fields.

 

For now, I'm simply catching any null pointer errors to make sure this doesn't stop any records from being saved and edited, but this seems like a terrible way of doing things. Does Apex have a way of testing if a field/variable exists? Or is there some other way of dealing with this I'm missing? I suppose I could simply set up try/catch for each individual variable as a way of setting "this variable exists" booleans, but again, I'm used to the idea that there should be a better way.

 

Thanks,

 

-Ben

  • February 26, 2013
  • Like
  • 0