Wednesday 18 February 2015

How to overide standard salesforce save button?

Hi guys!

Yesterday, I was working on overiding the standard save and cancel button. I know there are many blogs you ll find easily on google.

Anyways, am just sharing just to add a simple way(I think , u may find more easier  :P:P) of overiding . Lets jump to scenario.

Scenario:-  Say, I have a custom visualforce page abc and from there I have given a button on that page. When that button is pressed, it should take us to standard edit page of account. After clicking the save button it should take us to custom visualforce page. lets say to xyz page.



So , you guys are aware of  URL parameters that are appended when you open standard detail page of account inedit mode it is like :-

https://na15.salesforce.com/001/e?retURL=%2F001%2Fo

So, what happen is after you fill the details. and hit save button. it takes you to the record itself . It is the standard salesforce  functionality.

Lets see what these parameters are meant for:-

1. 001 - it is id of account object.
2. 001/e?-  It stands for edit mode .
3. retURL - It is the url when you click the cancel button
4. saveURL - It is the URL for landing page.

So, my requirement is that I have to redirect from my custom visulforce page to account edit page.
to do this - in your page refrnce method append this

pagereference pr= new pagereference('/001/e?retURL=/apex/AccountSearch&saveURL=/apex/CreateContac').setRedirect(true);

Thanks
Ankush






Sunday 1 February 2015

How salesforce matches Contact to the case when an email is received in Email-To-Case

Hi Guys,

I have been working on salesforce's Email to case Functionality since December. I cant say am perfect in it , but have got a good hold as of now.

Let me just walk you through how salesforce Email-To-Case functionality works. Though , ll not brief here about setting email to case .

So, when an customer sends an email to salesforce org. Then a case is created in the salesforce.

Let say, You have a contact  with a name xyz and his email address is xyz@abc.com. So, when he ll send an email to raise a case, his case will be created and and his contact will be asscoiciatd  with this case.

And how salesforce does this, all explationaltion is given here in salesforce know;ledge article.

CLICK HERE.


oAuth Use Case -  Headless API Explained in the Easiest way Wondering why? and When we use the Headless API flow Use case example: Imagine a...