• Markel Bilbao de la Vega
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hello,

We have develop custom web form which creates a new case in Salesforce using the REST API. In Salsforce we have set the case Auto-response rules to send an acknowledgement email to the customer when a new case is created.

We know that this auto-response rules will not fire when a case is created through the REST API, so we have created an after insert trigger on the Case object, with the following code:
List<Case> newlyInsertedCases = [SELECT Id From Case WHERE Id IN :newList AND Origin = 'Webform'];
if(newlyInsertedCases.size() > 0)
{
       Database.DMLOptions autoResponseOptions = new Database.DMLOptions(); 
       autoResponseOptions.EmailHeader.triggerAutoResponseEmail = true;
       for(Case cas : newlyInsertedCases)
       {
           Database.update(cas,autoResponseOptions);
       }
}
This should trigger the auto-response rules. In fact, when a case is created though our custom web form, in the log the auto-response rules are evaluated and the proper rule is selected, but the email is never sent.

Are we doing something wrong? Is it posible to trigger the auto-response rules when a case is inserted through the REST API (without having to re-write this functionallity in a WF or a process)?

Thank you in advance,

 
Hi,

I'm currently developing an application that uses the Open CTI Toolkit to perform searches for telephone numbers in Salesforce, screen pop the results, etc. This aplication worked perfectly until I decided to make a managed package. Since I created the managed package (defining a namespace for the instance), the Open CTI Toolkit doesn't seem to work.

For example, I call the searchAndScreenPop function but I never get the response. As far as I can see, no error or exception is being thrown; the method is called correctly but the callback is never received. The code worked perfectly until i create the managed package, so I assume that the error is related with the namespace, but I cannot find it.

The "funny" thing is that if I upload the package (managed beta) and I install it on another instance, it works fine.

Has anybody encountered any similar issue or has any idea of where the problem could be? 

Thanks in advance, and sorry for my bad English.
Hello,

We have develop custom web form which creates a new case in Salesforce using the REST API. In Salsforce we have set the case Auto-response rules to send an acknowledgement email to the customer when a new case is created.

We know that this auto-response rules will not fire when a case is created through the REST API, so we have created an after insert trigger on the Case object, with the following code:
List<Case> newlyInsertedCases = [SELECT Id From Case WHERE Id IN :newList AND Origin = 'Webform'];
if(newlyInsertedCases.size() > 0)
{
       Database.DMLOptions autoResponseOptions = new Database.DMLOptions(); 
       autoResponseOptions.EmailHeader.triggerAutoResponseEmail = true;
       for(Case cas : newlyInsertedCases)
       {
           Database.update(cas,autoResponseOptions);
       }
}
This should trigger the auto-response rules. In fact, when a case is created though our custom web form, in the log the auto-response rules are evaluated and the proper rule is selected, but the email is never sent.

Are we doing something wrong? Is it posible to trigger the auto-response rules when a case is inserted through the REST API (without having to re-write this functionallity in a WF or a process)?

Thank you in advance,

 
Hi im using OpenCTI searchAndScreenPop() function to search the records in salesforce.Im able to get popup for Contact,Lead,Account but for Opportunity its not working. Anyone has idea to make this working.

Thanks in advance.
I am using OpenCTI to screenpop the contact. But I am getting Failed to process API response error written in console. The weirdest thing is this is working in 2 other accounts and not in 3 accounts.

This is my code

sforce.interaction.searchAndGetScreenPopUrl(phoneNumber, 'Key1=value1', 'inbound', callBackFunction);

Is there something I have to do to make it work in all accounts ?