Monday, June 9, 2014

8) How to set Proxy Settings in Ant deployment in Salesforce?

Code to be added in build.properties:


proxy.host = Proxy_Host
proxy.port = Port_Number
proxy.user = Username
proxy.pwd = Password

Code to be added in build.xml:

<target name="proxy">
 <property name="proxy.host" value="${proxy.host}" />
 <property name="proxy.port" value="${proxy.port}"/>
 <property name="proxy.user" value="${proxy.user}"/>
 <property name="proxy.pwd" value="${proxy.pwd}"/>
 <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.pwd}" />
</target>

7 ) Sales Cloud consultant exam just for 100$ and 100$ free coupon for future exams

Sales Cloud consultant exam just for 100$ and 100$ free coupon for future exams.


Check now in Web assessor now!

This is valid only up to June 27th, 2014.


6 ) Salesforce Sales Cloud Consultant Exam Syllabus

Industry Knowledge - 5%

Implementation Strategies - 7%

Sales Cloud Solution Design - 23%

Marketing and Leads - 7%

Account and Contact Management - 15%

Opportunity Management - 15%

Sales Productivity - 12%

Communities and Site Management - 5%

Sales Cloud Analytics - 5%

Integration and Data Management - 6%

Wednesday, June 4, 2014

5) SFDC Clone Custom Object

  • Create your new custom object with the name you want but don’t give it any fields yet.
  • Download the Force.com IDE (if you don’t already have it)
  • Connect it to your instance of Salesforce.com
  • Set the metadata settings when you connect it to download your custom objects.
Now you’ll find representations of both your source and destination custom objects in XML.  You can just copy most of the fields from the source object, paste them into the destination object, save, and voila — all the fields will be there.  You can add other fields this way manually if you want too, but I find it’s sometimes easier to add fields using the web UI.

4) Role VS Profile

Profiles control:

  • The objects the user can access/action
  • The fields of the object the user can access/action
  • The tabs the user can access/action
  • The page layout that is assigned to the user
  • The record types available to the user
  • Profile is required field on User.

Role control:

Record level access can be controlled by Role. Depending on your sharing settings, roles can control the level of visibility that users have into your organization’s data. Users at any given role level can view, edit, and report on all data owned by or shared with users below them in the hierarchy, unless your organization’s sharing model for an object specifies otherwise.










3) Remove the rights to delete Notes from an object related list

Can you remove the rights to delete Notes from an object related list?

Knowledge Article Number: 000079753

Description
We encounter a serious problem with the accountability of our approvals based on Attachments/Notes. These Notes should not be deleted from the records associated even if the User has edit abilities to the record. Is it possible to remove the right to delete an Attachment/Note to all Users or to a Profile? I do not see this option in the permissions.

Resolution
Because the permission to delete Notes and Attachments is tied to the Edit permission on the object of record itself, you will need to take the edit permission from the object as unfortunately it’s not possible to modify permissions to Notes & Attachments itself.

Please visit our Idea Exchange to promote the following Ideas:

Delete Notes
Disallow file deletion based on user profile permission

A workaround to this would be to create a Visualforce page that displays the Notes and Attachment related list, but without displaying the delete link to the Notes and Attachment records.

Another option would be to create a Trigger that would prevent the deletion of the Notes and Attachment records.


Probably the less costly solution to implement is to install the following package from the Appexchange:

2) Insert Records in SF by using JavaScript without Apex classes or controller.


Hi guys,

In this post i am showing how can we use the power of javascript in VF page and inserting record in salesforce without any standard/custom controller or Apex.

By using AJAX Toolkit we can do this task easily.

AJAX Toolkit divides in two type synchronous and asynchronous call.

It works in three simple steps:
Connecting to the AJAX Toolkit(By using login methods or getting Session_ID)
Embedding the API methods in JavaScript.
Processing the results.
in following example i am using synchronous call :-

<apex:page id="Page" sidebar="false">
    <script src="/soap/ajax/20.0/connection.js" type="text/javascript"></script>
    <script>
        function insertAccount(){
            // Getting Session ID.
            sforce.connection.sessionId = "{!$Api.Session_ID}";
         
            //Creating New Account Record.
            var account = new sforce.SObject("Account");
            //Getting Account Name from inputText.
            account.Name = document.getElementById("Page:Form:PB:PBS:PBSI:Name").value;
         
            // This is the line where magic happens, calling Create() method.
            var result = sforce.connection.create([account]);
         
            if (result[0].getBoolean("success")) {
                alert("New Account is created with id " + result[0].id);
            } else {
                alert("failed to create new Account " + result[0]);
            }
        }
    </script>
    <apex:form id="Form">
        <apex:pageBlock title="Insert Account" tabStyle="Account" id="PB">
            <apex:pageBlockSection title="Account Name" columns="1" id="PBS">
                <apex:pageBlockSectionItem id="PBSI">
                    <apex:outputLabel value="Name" />
                    <apex:inputText title="Name" id="Name" />
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
            <apex:pageBlockButtons>
                <apex:commandButton onclick="return insertAccount();" value="Save"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Screen Shots:



 After inserting of record you are having ID of record :


1) Adding Summary field as footer of pageblock table in vf page.

Hi All,

This post is simply showing how can we add the summary field or total amount or other information in footer of PageBlockTable or DataTable in vf page.

Here, in the following example I am showing sum of all the opportunity line items in footer of PageBlockTable,

i am using the <apex:facet name="footer"> tag to show the value in the footer.

Here the code:
<apex:page standardController="Opportunity">  
    <apex:pageBlock title="{!Opportunity.Name}">  
 
    <apex:pageblocktable value="{!Opportunity.OpportunityLineItems}" var="oli">
        <apex:column value="{!oli.PricebookEntry.Name}"/>
        <apex:column value="{!oli.Quantity}"/>
        <apex:column value="{!oli.UnitPrice}">
            <apex:facet name="footer">
                <apex:outputText value="Total:" style="float: right;"/>
            </apex:facet>
        </apex:column>
        <apex:column value="{!oli.TotalPrice}">
            <apex:facet name="footer">
                ${!Opportunity.Amount}
            </apex:facet>
        </apex:column>
    </apex:pageblocktable>

    </apex:pageBlock>
</apex:page>