Be Good & Do Good!

Tag: Salesforce (Page 5 of 11)

Visualforce – Align Columns To Right

Sometimes there is a need to align(float) few of the columns of datatable to right for eg., List Price in Opportunity Products page functionality is shown in right aligned style.

In those cases, use following piece of snippet to render the column header and column values in right aligned manner

<apex:column width="23%">
<apex:facet name="header" >
<apex:outputPanel id="datePanel" style="float:right;">Role</apex:outputPanel>
</apex:facet>
<apex:OutputLink style="float:right;" target="_blank" value="/{!UserRoleName}">{!UserRole.Name}</apex:OutputLink>
</apex:column>

Highlighted in above code are two different approaches

  1. Use output panel to enclose set of things and add float:right style attribute to it
  2. Directly add float:right style to the element (in this case OutputLink)

Salesforce new user Interface warning

Today, I enabled new user Interface on one of my developer org and noticed that it’s not supported on all browsers. There’s a small warning box that appears the moment you select the New User Interface.

You need to contact salesforce support in order to enable New User Interface feature. Once enabled, to set up your User Interface please access Setup | Customize | User Interface.

New User Interface

Salesforce Apex Commons Lang Project

apex-lang is an open-source library of helper classes written purely in apex whose goal is to address shortcomings in the core apex classes. (If you’re not familiar with apex, apex is the programming language provided by salesforce.com’s development platform and is essentially a trimmed down version of java with added syntax for exploiting the force.com platform.)

apex-lang was inspired by the Apache Commons Lang project whose creators had a similar goal of addressing gaps in java’s core API. apex is fairly feature rich; however, let’s face it, functionality in its core API is sorely lacking. And why shouldn’t it? salesforce.com is in the “on-demand platform” business, not the API building business.

On the other hand, apex-lang is very much in the API building (not for profit) business. So, its the intent of apex-lang to fill in the gaps in the core apex classes. And to fill them more quickly than salesforce can. Salesforce only has 3-4 releases a year; in contrast, apex-lang can be released as many times as needed during a single year.

Install to:
Production as Managed Package
Sandbox as Managed Package
Production as Unmanaged Package
Sandbox as Unmanaged Package

Alternatively, you can Download the source or Browse the code

Also available on AppExchange @ http://sites.force.com/appexchange/listingDetail?listingId=a0N30000001qoYfEAI

Ack : Richard.Vanhook

How to remove focus from Date Calendar input field …

Scenario
I had a Visualforce page where the second field is a date field. Everytime the page loads, salesforce automatically brings the date field in focus and the calendar widget pops up. This can be very confusing to the users as the date field is required to be populated only in certain cases. Is there a way to remove the focus or allow me to have some other field in focus?

Solution
Create hidden element inside form

<input id="hiddenElement" type="hidden" />

Add following JS code to add an window.onload event to set the focus to the hidden element

<script type="text/javascript">

window.onload = setFocus

function setFocus() {

document.getElementById(“hiddenElement”).focus();

}

</script>

To conclude, ..

So no longer the page load will default the focus to Calendar field and no longer the pop-up will hinder the page view.

nJoy Coding!!

Salesforce – Full Copy vs Config vs Developer Sandbox

Full Copy Sandbox

  • Full sandboxes copy your entire production organization and all of its data, including standard and custom object records, documents, and attachments

Configuration Only Sandbox

  • Copy all of your production organization’s reports, dashboards, price books, products, apps, and customizations under Setup, but exclude all of your organization’s standard and custom object records, documents, and attachments.
  • Creating a configuration-only sandbox can decrease the time it takes to create or refresh a sandbox from several hours to just a few minutes, but it can only include up to 500 MB of data

Developer Sandbox

  • Special configuration-only sandboxes intended for coding and testing by a single developer. They provide an environment in which changes under active development can be isolated until they are ready to be shared.
  • Developer Sandboxes copy all application and configuration information to the sandbox, but are limited to 10 MB of test or sample data

Where Do I Develop?

Developer sandbox Configuration-only sandbox Full copy sandbox
Development
perfect, if extension app
also fine
slower to copy
giving developers access to data may not be ok
Testing
unit tests
apex tests
best for feature test
load standard data for regression
best for production debugging
Testing external integrations
not a good fit
special cases only
use sample or subset data
works well if using external ids
frequently required
external system expects full production data to be present
Staging / UAT
not a good fit
sometimes appropriate if testing against subset of production data is acceptable, e.g. regional
usually required
validation of new apps against production config and data
Sandboxes Available / Edition
EE – 1 sandbox
UE – 1 sandbox
UE – 5 config sandboxes
Note: Can purchase up to 6 config only sandboxes
UE – 1 full sandbox
Note :Can purchase up to 3 full sandboxes
Considerations
Small 10 MB
500 MB storage
Same as production

Salesforce Sandbox Considerations

  • Customizations and data changes in your production organization do not automatically appear in your sandboxes. You must create a new sandbox or refresh an existing one to see the customizations made to your organization since the last time you created or refreshed a sandbox
  • Sandbox copy is a long-running operation that occurs in the background. You are notified of the completion of a sandbox copy via email. Sandbox refreshes may complete in minutes, days, or even more than a week
  • Always log in to your sandbox organization using the https://test.salesforce.com login URL
  • Sandbox IDs can change with each refresh
  • Salesforce stores sandbox organizations on several instances. When a sandbox is created or refreshed, an instance is selected for your sandbox, so your sandbox may appear on different instances and have different URLs
  • When data that contains object IDs is copied from your production instance into your sandbox, the object IDs in your sandbox match the object IDs in your production instance
  • Sandboxes must be on the same version as Production in order to take advantage of the AppExchange
  • Freeze all changes to your production organization while a sandbox is being created or refreshed. Setup and data changes to your production organization during the sandbox creation and refresh operations may result in inconsistencies in your sandbox.
  • Refreshing a sandbox deletes and recreates the sandbox as a new copy of the production organization. In effect, this reverses any manual access changes you have performed. If you created users on sandbox, they will no longer exist; if you changed a user’s profile and permissions, those will revert to their values in the production organization. This means that after a refresh, any access changes you performed must be repeated in the new copy. To avoid this process, you can create user templates in your production organization, and then activate them in the sandbox organization.
  • Features Disabled in Sandbox (Note:  These features can not be enabled in the sandbox)
    • Case escalation, opportunity reminders, and contract expiration warnings are disabled because they automatically send email to contacts, customers and users who should not interact with sandboxes.
    • Subscription summary
    • Automated weekly data exports
    • The ability to create Salesforce sandboxes.
    • Testing Salesforce Content in your sandbox is not supported.
    • Testing Salesforce for Google AdWords in your sandbox is not supported. Attempting to test Salesforce for Google AdWords in your sandbox will result in errors because your sandbox organization operates with the same link to your Google AdWords account as your production organization.
    • Email service addresses that you create in your sandbox cannot be copied to your production organization.
  • Info and URLs
    • Links
      • Avoid using absolute URLs in custom links https://na1.salesforce.com/00Oz0000000EVpU&pv0={!Account_ID}
      • Instead use relative URLs /00Oz0000000EVpU&pv0={!Account_ID}
      • only use relative URLs in your production organization
    • Integrations
      • Do not hard code integrations toward a specific instance. (Web Service API calls)
    • Sandbox and production instances upgrade at different times
      • A Sandbox may be upgraded earlier or later than the production org, depending on instance
      • Sandbox instance is determined by date of the copy
      • Look at trust.salesforce.com for information on sandbox upgrade timing

Salesforce – Spring’10 Release Feature List

New Opportunity page

Highlights panel
Recommendations
Drag and drop side tabs

Quote

A quote is a record showing proposed prices and other information for products and services. You can create a quote from an opportunity and its products.

Apex Triggers for ContentVersion

Apex triggers can now be associated with ContentVersion.

Partner Portal Users No Longer API Enabled

New partner portal users no longer have automatic access to the API. Administrators must enable access to the API for each new user as needed.

Introduction of Aggregate Functions in SOQL.

AVG() : Returns the average value of a numeric field.
COUNT_DISTINCT() : Returns the number of distinct non-null field values.
MIN() : Returns the minimum value of a field.
MAX() : Returns the maximum value of a field.
SUM() : Returns the total sum of a numeric field.

Entitlement Management

Entitlement management lets the support reps:
Verify if customers are eligible for support
Create and maintain service contracts for customers
Specify unique service levels for each customer, such as first response and resolution times
Enforce service levels with time-dependent, automated processes that instruct reps how to resolve cases

Answers

Answers is the newest feature of the Community application that lets community members ask questions, post replies, and vote whether they like or dislike a reply.

Work with Portal Button on Accounts and Contacts

Now, Customer Portal and Partner portal have a single drop down button ‘Work with Portal’ to support options such as View Portal User, Disable Portal User, Login as Portal User.

Portal Health Check

In Spring ’10, administrators can use portal health check reports to easily monitor the access to the portals by customers or partners. Portal health check reports show the security-related portal settings and provide information which can be used to improve portal security.

New API Object for Articles

With inclusion of the new API object , KnowledgeArticleVersion Articles can now be retrieved through API.

Enhanced Security for Custom Object Permissions

With Spring ’10, users will not get access to custom objects automatically. The “Read,” “Create,” “Edit,” “Delete,” “View All,” and “Modify All” permissions are disabled for any profiles in which .“View All Data” or “Modify All Data” is disabled.


The New Report Builder—Developer Preview

Available only in Developer edition and works only with tabular reports. This new report builder is an alternative to the report wizard for creating and editing reports. The report builder interface consists of three resizable panes:
i. Fields Pane :
ii. Filters Pane :
iii. Preview Pane :

View Dashboard’s Running User

Wiith Spring ’10, the running user is shown in the new Displaying data as field when viewing or editing a dashboard.

New Visibility Option for Report and Dashboard Folders

A new visibility option , ‘This folder is accessible by all users, except for portal users’ is added for report and dashboard folders.

Apex code enhancements

i. The Apex scheduler (Code Scheduler) is now generally available.
ii. Limits on the number of items in a collection has been removed. However, there’s still a
general limit on heap size.
iii. Generic collection is now supported.
Eg : Set foo = new Set();
iv. Line numbers also display in the detail view of the Apex triggers and class.

Multilevel Master-Detail Relationships

Master – detail relationships are enhanced to include multiple levels such as master-detail-subdetail.

Lookup Filter Beta Enhancements

With Spring ’10, following enhancements have been made:
– Define optional lookup filters
– Support for lookup filters that reference assets, entitlements, quotes, and service contracts,
which wasn’t available earlier.
– Select Profile Names in Filter Criteria.

Workflow for Sites

With inclusion of Site object for creation of workflow rules, one you can create rules that trigger email alerts when certain site-related criteria such as daily bandwidth, request time, monthly page views allowed etc are met.

Authenticated Sites Generally Available

With Spring ’10, the ‘Authenticated Website User’ user license is generally available.
Unlike other portal users, authenticated site users don’t have roles, eliminating performance issues associated with role hierarchy calculations.

Sandbox to Production—Change Sets Beta

Change sets is a web interface which can be used to move configuration changes (except profiles) in addition to using Force.com IDE or the Force.com Migration Tool. This is currently in beta version and available in Enterprise, Unlimited, and Free Editions.

Delete support in Bulk API

Support for delete is now included in Spring’10 for Bulk API.
To delete records via Data Loader, use the Use Bulk API setting which has replaced Use Bulk API for Insert, Update, and Upsert setting.

Salesforce – Using List Custom Settings

Salesforce.com recently introduced Custom Settings in Winter ‘10 which allows you to store custom data sets and associate them on an org-wide, profile or user basis. Custom Settings are essentially custom objects that are exposed in the applications cache and are accessible via their own API.

You can certainly build your own custom objects to store settings but using custom settings is much quicker (again they are stored in the application cache) and do not count against SOQL limits when fetched. You can also use custom settings in formula fields, validation rules, Apex code and the Web Services API.

Custom settings come in two flavors: list and hierarchy.

Jeff’s post focuses on list custom settings which is the simpler of the two to grok. Read Jeff post @ http://blog.jeffdouglas.com/2010/01/07/using-list-custom-settings-in-salesforce-com/

Salesforce – Spring ’10 Release Preview Webinar

Spring’10 webinar covered a number of features to help you, whether you’re building new applications on Force.com, or using existing products such as Salesforce CRM.

Part 1 : Custom Cloud – Learn how many new Force.com features, including Multilevel Master-Detail Relationships and Rich Text Areas, can help you build richer applications, faster.

Part 2 : Sales & Service Cloud – Discover how new features in Salesforce CRM, including Salesforce Automation, Salesforce Knowledge and Salesforce Answers, can help transform the way you interact with customers and partners.

View the two recorded webinars at http://wiki.developerforce.com/index.php/Tech_Talk:_Spring10_Release_Preview

« Older posts Newer posts »