Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

Friday, April 4, 2014

Streaming Realtime data in Visualforce pages - Thanks Sieve

I have been looking so hard to show a real time data into visualforce page quite a long. But after seeing the detailed note by Sieve it turned out to be big pain reliever for me thanks once again to Sieve.

Please have a look at this blog post in Streaming Real Time Data in Visualforce Page and his video session 

Tuesday, September 18, 2012

EMAIL SERVICES IN SALESFORCE-EXAMPLE

I shared about the Salesforce's Email Services in my previous post..Creating Record by sending email to Salesforce - Part 1..

With this Email Service our part is to create an Apex Class to fetch the details from the email which we sent to Salesforce.

To fetch the data from incoming email we should make use of the Inbound Email messaging feature.

For Example:


global class recordfromEmail implements Messaging.InboundEmailHandler {

  global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email,
    Messaging.InboundEnvelope envelope) {

    Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();

Oppotunity Oppty = New Oppotunity();

       String[] emailBody = email.plainTextBody.Split('\n',0); 
       
       oppty.Name = emailBody[0]; 
      
       oppty.Stage = emailBody[1]; 

       insert oppty;

  return Result;
 }

}

EMAIL SERVICES IN SALESFORCE


Yes , it is possible to create a record  just by sending an email to your Salesforce login.....

All can be done with the Salesforce's awesome feature called 'Email Services'.

With This Email Services in Salesforce all we have to do is,

  • Associate one Email id with Salesforce.
  • An Email from Salesforce will be generated and should be associated for.Sending mails to the salesforce.

Email Services can be created by

SetUp --- Develop --- Email Services



The generated email from Salesforce will be like

testemail@9q9zr6cc1w67kjgunhpqftj32.in.sandbox.salesforce.com


Email Service also facilitate users to get known to the errors occurring  while processing the email.

Users can specify an alternate email address to which the errors can be diverted..

Users need to write an Apex class to fetch the details in the email with the help of inBound email Class function.


That's it we can create a Email Service.......