Showing posts with label Salesforce. Show all posts
Showing posts with label Salesforce. Show all posts

Wednesday, 10 September 2014

ForURL() Method On VisaulForce page

                                      URLFOR()  Method

URLFOR() method is use to access the url in visualforce page with respect to passed method parameter's.

Here I am going to demonstrate for URLFOR method with some scenario . Some time we have requirement to redirect on page,redirect on action of particular object, perform a action with return url and access a resources.

1. Access css from zipfile resource.

                   <apex:stylesheet value="{!URLFOR($Resource.Bootstrap,'bootstrap-3.2.0-dist/css/bootstrap.min.css')}"/>

2. Access css file resource.
                   <apex:stylesheet value="{!URLFOR($Resource.Bootstrap)}"/>     

3. Redirect on customPage.

                 <a href="{!URLFOR($Page.SetUp)}">Accounting Hub</a>

4.  Redirect on Action.
               <a tabindex="-1" href="{!URLFOR($action.BankAccount__c.New,$ObjectType.BankAccount__c)}">Bank Account</a>.

5.  Redirect on page with return url.

                <apex:commandButton action="{!URLFOR($Action.Account.view, ID, [retURL=myRet])}" value="New Opportunity" id="theButton"/>
           



Tuesday, 9 September 2014

Mini Page Layout Using Apex Code


Suppose to we need to show a salesforce mini page layout on link tag in VF page. Here I showing some line of code which will be responsible to show a mini page layout.

e.g.

    <a href=”/{!acc.Id}” id=”{!acc.Id}” onblur=”LookupHoverDetail.getHover(‘{!acc.Id}’).hide();” onfocus=”LookupHoverDetail.getHover(‘{!acc.Id}’, ‘/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1′).show();” onmouseout=”LookupHoverDetail.getHover(‘{!acc.Id}’).hide();” onmouseover=”LookupHoverDetail.getHover(‘{!acc.Id}’, ‘/{!acc.Id}/m?retURL=%2F{!acc.Id}&isAjaxRequest=1′).show();”>{!acc.Name}</a>


In above the code LookupHoverDetail.getHover().hide() and LookupHoverDetail.getHover().show() these method will show and hide mini page layout.

Here I am showing pagelayout onfocus and onMousOver on link. and hiding on onblur and onmouseout();



Salesforce Basic Knowledge

  Life Cycle of Salesforce Rules Execution



Salesforce reules execution order is following

  1. Validation rules
  2. Assignment rules
  3. Auto-response rules
  4. Workflow rules(with immediate actions)
  5. Escalation rules
Tip:- (Logic VAAWE)

Monday, 8 September 2014

Salesforce LIMITS

Salesforce LIMITS

  • VF page size is 15 mb. 
  • page view state size is 135kb.
Summer 14 updates

  • The maximum number of relationship fields per object has been increased from 25 to 40 fileds. and external id Fields from 3 fields per object to 7 fields per object.
  • Rules limit were raised from 300 to 500 per object. And from 1000 to 2000 per orgianization. but these limit are combination of active and inactive workfolw ,assignment,auto-response,escalation rules. But number of active rules hasn't changed it remains at 50 rules per object.
  • No more limits on GetDescribe().

Dynamic Component

<apex:dynamicComponent ComponentValue="{!ComponentData}"/>             



public class MyController 
{
public transient ApexPages.Component ComponentData { get; private set; }
public MyController() 
Type t = Type.forName('Component.c.MyCustomComponent');
if(t != null) 
this.ComponentData = (ApexPages.Component)t.newInstance(); 
}
}