Thursday, October 24, 2013

Working with Custom SOAP and REST Services in .NET Applications

           The Force.com platform gives developers a multitude of choices for accessing data. The SOAP API and REST API provide complete access to standard and custom Force.com objects. However, the need often arises to extend built-in functionality in order to support unique business requirements. Fortunately for Force.com developers, it's simple to create powerful, custom services that can be consumed in any platform.
This article explains how developers can build custom Force.com SOAP and REST services and consume them in .NET applications.

         For More information please Click Here.

Friday, October 11, 2013

Editing Multiple Records at a Time using the RecordSetVar

Scenario:

         You want to edit multiple records at a time ,Don't worry .Salesforce also provided Standard List Controllers(RecordSetVar) along with Standard ,Custom and Extension Controllers.By using RecordSetVar we can achieve it.

  RecordSetVar:
       This attribute indicates that the page uses a set-oriented standard controller. The value of the attribute indicates the name of the set of records passed to the page. This record set can be used in expressions to return values for display on the page or to perform actions on the set of records. For example, if your page is using the standard accounts controller, and recordSetVar is set to "accounts". 

Standard list controllers can be used with the following objects:
  • Account
  • Asset
  • Campaign
  • Case
  • Contact
  • Contract
  • Idea
  • Lead
  • Opportunity
  • Order
  • Product2
  • Solution
  • User
  • Custom objects

VisualForce Page:
<apex:page standardController="Opportunity" 
           recordSetVar="opportunities"
           tabStyle="Opportunity" sidebar="false">
  <apex:form >
    <apex:pageBlock >
      <apex:pageMessages />
      <apex:pageBlockButtons >
        <apex:commandButton value="Save" 
                            action="{!save}"/>
      </apex:pageBlockButtons>
      <apex:pageBlockTable value="{!opportunities}" 
                           var="opp">
        <apex:column HeaderValue="Oppty Name">
          <apex:inputField value="{!opp.name}"/> 
        </apex:column>
        
        <apex:column headerValue="Stage">
          <apex:inputField value="{!opp.stageName}"/>
        </apex:column>
        <apex:column headerValue="Close Date">
          <apex:inputField value="{!opp.closeDate}"/>
        </apex:column>
      </apex:pageBlockTable>      
    </apex:pageBlock>
  </apex:form>
</apex:page>
 
Note:
    By default the RecordSetVar only displays 20 records at a time.If you want change 
the number of records displayed you can use the extension controller to set the size.
 
ScreenShots: 

Before changing the AB oppty stage from NeedAnalysis to ProposalPriceQuote


After changing the AB oppty stage from NeedAnalysis to ProposalPriceQuote