• Jonny.Kates
  • NEWBIE
  • 25 Points
  • Member since 2011

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

Hi guys,

 

I'm trying to create a case escalation rule that should escalate a case that has been submitted via our web-to-case inquiry form 2 weeks (336 hours) after the date it is created, if it is not yet closed.

 

  1. My case escalation rule filter says to trigger if origin is web (we get some other support ticket routes by email)
  2. Then I create an escalation action to alert a certain Salesforce user by email template. For testing purposes, I've set the age over value to 0 hours 30 minutes.
  3. When I create a case with origin web, I now expect the escalation to trigger if it is not set to a closed status within half an hour. It doesn't - and I'm not sure what I could be doing wrong in such a seemingly simple set up.

What's more curious is that if I look in the administration setup > monitoring > case escalations, I can see that my test case is queued up to be escalated 30 minutes after creation - a time that has already elapsed.

 

Any ideas?

Hi guys - this appears like it's a reasonable well documented problem but I'm still struggling here...

 

We have a web-to-case form on our website that asks users about their company. Most of these questions are new to our database, in that they don't appear on the existing Account record for the user's company. However a handful of them - such as their registered company number - overlap with existing fields on their Account. It's not possible to put the Lookup field in to the self-service form so I'm left with a situation where I have both Case.Registered_name__c being fed by the web form and a Lookup to the existing value on the related Account: Case.Account_RegisteredName__c.

 

It's not possible to create Workflow to update the Lookup if there's a conflict so I'm going to have to write a Trigger for it. At the moment I'm making do with an email alert to myself and then manual resolve.

 

Ideally, in lehman's terms...I would like both fields to effectively be synonymous. If the Registered Name value is updated on the Account, update it on the Case. If it's updated (/inserted) on the related Case then update the Account value.

 

More than acceptable...if the value on create or edit new case does not equal that of the 'duplicate' Lookup value, then update the Lookup value.

 

Thanks in advance,

Jonny

Hi all,

 

I am finishing up a web-to-case form but have run in to what appears like a glaring oversight from Salesforce.

 

I have written some Javascript to validate the end-user's responses before the form is sent. Some fields have max values, some are mandatory etc. The Javascript will look through the DOM for a field's ID and then run its logic tests. However, form fields in HTML4 cannot begin with a number. For the web-to-case to work properly, I have to specify the HTML field's ID to match the Salesforce ID for that field - which of course, start with a number.

 

So I can either:

 

  • Run the web-to-case with no front end Javascript validation. However, validation will be respected on the Salesforce end, so if the user doesn't fill in a mandatory field and hits send; they will receive no notification that anything went wrong, neither will I, and everything they've written is lost as the transaction failed: no case created.
  • Add a leading character to the field IDs. This will mean the Javascript will work, but obviously the transaction to Salesforce will fail as the IDs now do not match: no case created.
  • Update the site to HTML5.

Obviously 3 is the only real choice, but this is slightly a pain and I did not anticipate having to do this for this piece of work. Salesforce should be transparent when you are setting up the web-to-case HTML that Javascript validation is not going to be possible on HTML4. It seems somewhat poorly thought out.

I'm working on a VisualForce page for a custom object. I have apex form inputfields within a styled HTML table to suit the preferred UI layout of the client. Underneath the table is a commandButton for the form, which will action {!save} when clicked. It successfully writes the data from the inputfields - no problem. But when clicked, it just refreshes the iframed VF page element. The result is that the whole page-layout for the object is refreshsed within the embedded VisualForce page, whilst the 'parent' page - the original browser if you will - remains unchanged.

 

How can I make the commandButton commit the inputfields, and then refresh the browser?

 

Hope I've explained that clear enough - can try and capture it in screen shots if needed.

Hey guys, I'm a self-confessed Apex amateur and was wondering if I could get a hand with something.

 

I'm trying to get Salesforce to hit an external URL on Contact delete. Our site has a registration process which feeds SalesForce new Contacts. From that point on, the two entities in seperate databases (i.e. website.user and salesforce.contact) are synchronised. However, I want to make it so that when a Contact is deleted in SalesForce, their c.ID is pushed to the website by method of a URL suffix. This means that the website can simply 'listen' to SalesForce rather than scan the database for any missing Contact records.

 

This is probably horrendous - and low and behold doesn't work - but can someone give me a hand with this Apex class?:

 

public class ContactDeleteURL {
public static void hitTheServer(Contact[] con) {
for (Contact c:con){
HttpRequest req = new HttpRequest();
req.setEndpoint ('http://www.mywebsite.com/remove_contact?sfid=' + c.Id);
req.setMethod ('POST');
}
}
}

 ..and trigger:

trigger ContactRecordDelete on Contact (after delete) {
Contact[] con = Trigger.new;
ContactDeleteURL.hitTheServer(con);
}

 I'm getting the following error when I try to delete a Contact, if that helps:

 

ContactRecordDelete: execution of BeforeDelete

caused by: System.NullPointerException: Attempt to de-reference a null object

Class.ContactDeleteURL.hitTheServer: line 3, column 16
Trigger.ContactRecordDelete: line 3, column 1

 

Hi all,

 

I'm trying to create a custom button that uploads a contact's details to Constant Contact from within the contact page layout.

 

I can currently upload mass contacts to Constant Contact from a contact list view by using the 'Constant Contact for SalesForce' package (1.6.2). This process involves check-boxing beside any number of contacts in a list, and then adding them to the upload to Constant Contact wizard, which takes care of the rest of the work (onclick Java):

 

var contactIds = {!GETRECORDIDS($ObjectType.Contact)};

if (!contactIds || contactIds.length < 1) {
alert('Please select at least one Contact to upload.');
} else {
var baseUrl;

var hostnameParts = location.hostname.split('.');
if (hostnameParts[0] == 'ctct2') {
baseUrl = 'https://ctct2.' + hostnameParts[1] + '.visual.force.com';
} else {
baseUrl = 'https://ctct2.' + hostnameParts[0] + '.visual.force.com';
}

var form = document.createElement('form');
form.action = baseUrl + '/apex/UploadWizardStep1';
form.method = 'post';

var hiddenTypeField = document.createElement('input');
hiddenTypeField.id = 'type';
hiddenTypeField.name = 'type';
hiddenTypeField.type = 'hidden';
hiddenTypeField.value = 'Contact';
form.appendChild(hiddenTypeField);

var hiddenUploadIdsField = document.createElement('input');
hiddenUploadIdsField.id = 'uploadIds';
hiddenUploadIdsField.name = 'uploadIds';
hiddenUploadIdsField.type = 'hidden';
hiddenUploadIdsField.value = contactIds;
form.appendChild(hiddenUploadIdsField);

document.body.appendChild(form);

form.submit();
}

 

 

However, I want to just add one contact to the upload wizard through process of a custom button on the contact page layout. Any help greatly appreciated.

Hi all,

 

I am finishing up a web-to-case form but have run in to what appears like a glaring oversight from Salesforce.

 

I have written some Javascript to validate the end-user's responses before the form is sent. Some fields have max values, some are mandatory etc. The Javascript will look through the DOM for a field's ID and then run its logic tests. However, form fields in HTML4 cannot begin with a number. For the web-to-case to work properly, I have to specify the HTML field's ID to match the Salesforce ID for that field - which of course, start with a number.

 

So I can either:

 

  • Run the web-to-case with no front end Javascript validation. However, validation will be respected on the Salesforce end, so if the user doesn't fill in a mandatory field and hits send; they will receive no notification that anything went wrong, neither will I, and everything they've written is lost as the transaction failed: no case created.
  • Add a leading character to the field IDs. This will mean the Javascript will work, but obviously the transaction to Salesforce will fail as the IDs now do not match: no case created.
  • Update the site to HTML5.

Obviously 3 is the only real choice, but this is slightly a pain and I did not anticipate having to do this for this piece of work. Salesforce should be transparent when you are setting up the web-to-case HTML that Javascript validation is not going to be possible on HTML4. It seems somewhat poorly thought out.

I'm working on a VisualForce page for a custom object. I have apex form inputfields within a styled HTML table to suit the preferred UI layout of the client. Underneath the table is a commandButton for the form, which will action {!save} when clicked. It successfully writes the data from the inputfields - no problem. But when clicked, it just refreshes the iframed VF page element. The result is that the whole page-layout for the object is refreshsed within the embedded VisualForce page, whilst the 'parent' page - the original browser if you will - remains unchanged.

 

How can I make the commandButton commit the inputfields, and then refresh the browser?

 

Hope I've explained that clear enough - can try and capture it in screen shots if needed.