Wednesday, October 16, 2013

A Sample Application for every Salesforce beginner

A Sample Application for every Salesforce beginner! 

Hi all !

I created a sample tabbed Salesforce application that contains content, embedded media, implementation of custom component, custom controller, displaying data from salesforce database and a javascript image gallery. All of these are implemented on a simple application.


SAMPLE SALESFORCE TABBED APPLICATION

1) For Invoice_Statement__c  you will have to create a custom object. I created invoice statement object by following  "Force.com Workbook" provided by saleforce using basic APEX.

2) header is an image that I used to place it on top of my tabbed application.

3)I used myStyles to implement my custom CSS and background image.

4) <c:vf_component /> is how a custom component should be called. Custom component are just like functions in c language. You can reuse them for any number of time.

5) gameswf is a fly-killing SWF game embedded in visualforce.

6) Invoice_Statement__c.Status__c. Here "Status" is a field inside our custom object "Invoice Statement".

7) Finally the javascript image gallery. Used a simple onmouseover and onmouseout function. ek, do, teen, chaar, paanch are image names (ek.jpeg, do.jpeg .....). Here's the gallery:



WEB GALLERY USING APEX and JAVASCRIPT


<apex:page sidebar="false" showHeader="false" tabstyle="Invoice_Statement__c" standardController="Invoice_Statement__c" id="thePage" standardStylesheets="false">

 <apex:image url="{!$Resource.header}" width="1250"/>

  <apex:stylesheet value="{!URLFOR($Resource.myStyles, 'styles.css')}"/>
    <style type="text/css">
        p{ background-color: ;}
           tabPanel{ background-color:blue;}
          .activeTab {background-color: #236FBD; color:white; background-image:none}
          .inactiveTab { background-color: lightgrey; color:black; background-image:none}

    </style>
  
    <apex:tabPanel switchType="client" selectedTab="name1" id="theTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">
      <style type="text/css">body { background-image: url("{!URLFOR($Resource.myStyles, 'images/back.jpeg')}") }</style>
        <apex:tab label="Home" name="name1" id="tabOne"><p><b>Salesforce.com</b> provides a lot of standard features which can be used by out of box customization. You can utilize the maximum power of Salesforce.com to increase your business if you are moving in right direction from day 1. Also proper knowledge of all standard features can save you a lot of customization cost. Our experts will guide you with your implementation where a custom development is required and where we can achieve the things by using standard Salesforce features. So Think smart, do smart and grow your business.</p> </apex:tab>
        <apex:tab label="Why our company?" name="name2" id="tabTwo"><h2> Why New World Software? </h2>

<br/>We help financial services firms develop business solutions that drive efficiency, effectiveness, innovation and virtualization. When you choose New World Software, you benefit from deep industry expertise to help manage risk, comply with regulations, enhance product features and manage your business transformation challenges.
There are generalists and there are specialists. It makes sense to choose a firm organized around specialists—smart people succeeding every day in the global markets. With New World Software, you gain access to an expanded team of technology and functional experts who specialize in:
<ul>
   <li>Asset and Wealth Management</li>
    <li>Retail Banking</li>
    <li>Consumer Lending</li>
    <li>Investment Banking and Brokerage</li>
    <li>Retail/Wholesale Banking</li>
    
</ul>

To discuss about our services, expertise and how we can help you, please contact us on chandra@newworldsoftware.com or call +91-9740169197 or fill the form on left. </apex:tab>
<apex:tab label="Demo" name="name4" id="tabThree" ><h2>DEMO</h2><c:mynewcomponent />  <c:vf_component />
</apex:tab>

        <apex:tab label="Game" name="name5" id="tabFour"><h2>Kill game</h2><p> <apex:flash play="true" loop="true" src="{!$Resource.gameswf}"  height="300" width="50%" /></p></apex:tab>
         <apex:tab label="Customization" name="name3" id="tabFive"><h2>Salesforce.com</h2> 
       <apex:pageBlock title="Invoice Statement">

        <apex:detail />
        <apex:pageBlockTable value="{!Invoice_Statement__c.Status__c}" var="item">
           <p><br/>  <apex:column value="{!Invoice_Statement__c.Invoice_Value__c}"/> 
                <apex:column value="{!Invoice_Statement__c.Description__c}"/> 
            </p>
        </apex:pageBlockTable> 

    </apex:pageBlock> 

</apex:tab>
<apex:tab label="Integration" name="name6" id="tabSix"><h2> Integration with Sharepoint</h2>

Use external data sources together with external objects to search SharePoint 2007, SharePoint 2010, and SharePoint Online data in Salesforce. (To include external data in searches, Chatter must be enabled for your organization.)
To ensure smooth data transfer, configure SharePoint and Salesforce as follows.
In SharePoint, edit scope properties and rules to ensure that they include the data you want to access in Salesforce:
In SharePoint 2007 or 2010, navigate to <b>Central Administration | Application Management</b>, and click <b>Manage Service Applications</b>. In the list of applications, click Search Service Application. Then, in the left column, click Scopes.
In SharePoint Online, navigate to Site Actions | Site Settings. Under Site Collection Administration, click Search Scopes.
<br/><br/>
For most SharePoint 2007 or 2010 metadata properties, you can filter or sort corresponding fields of external objects in Salesforce. To adjust this behavior, do the following:
If you cannot filter or sort in Salesforce, in the left column of SharePoint, click <b>Metadata Properties</b>, then click the property name, and select Reduce Storage Requirements for Text Properties by Using a Hash for Comparison.
If filtering or sorting is disabled for a SharePoint property by design, select Filtering Disabled and Sorting Disabled in the corresponding Custom Field Definition in Salesforce. Otherwise, errors may occur.
SharePoint Online offers more limited integration. When you validate and sync the external data source, Salesforce accesses a default set of metadata properties, but the corresponding fields in external objects are not filterable or sortable.
</apex:tab>
<apex:tab label="Gallery" name="name7" id="tabSeven">

<tr>
<td><apex:image url="{!$Resource.ek}" /></td>
<td><apex:image url="{!$Resource.do}" onmouseover="ImageOver(this)" onmouseout="ImageNormal(this)"/></td>
<td><apex:image url="{!$Resource.teen}" /></td>
</tr>
<tr>
<td><apex:image url="{!$Resource.chaar}" /></td>
<td><apex:image url="{!$Resource.paanch}"  id="MyImage" /></td>
</tr>

</apex:tab>

</apex:tabPanel>
    
     <script type="text/javascript">
function ImageOver(MyImage)
{
    MyImage.src='{!$Resource.over}'; 

function ImageNormal(MyImage)
{
    MyImage.src='{!$Resource.do}'; 

</script>
</apex:page>
               

I hope this application is of some use to Salesforce beginners. Corrections and suggestions are most welcome.

Moin
Salesforce Beginner

No comments:

Post a Comment