Run SWF file in Salesforce Environment

August 13th, 2009 by nishant.shah § 1

For all the developers who are just starting development in Salesforce may find this article useful. I am going to tell you how you can run an SWF file in Salesforce.

First of all add a reference to the Salesforce namespace to  mx:Application tag and create a connection to the Salesforce.com server.

Eg.

<mx:Application xmls:mx=”http://www.adobe.com/2006/mxml”    xmls:salesforce=”com.salesforce.*” layout = “absolute”/>

<salesforce:Connection id=”apex”/>

The Connection object is already created, so to activate it,Prepare a LoginRequest object by populating the username and password fields. We have to define Callback function(loginResult) that will be fired off when the login response from the Salesforce.com server is received.

Eg.

private function login():void

{

var lr:LoginRequest = new LoginRequest;

lr.username = username.txt;

lr.password = password.txt;

//  lr.server_url = Application.application.parameters.server_url;

// lr.session_id = Application.application.parameters.session_id;

lr.callback = new AsyncResponder(loginResult);

apex.login(lr);

}

No need to give lr.session_id and lr.server_url when running application on local machine.

Deployment

We have three choices to deploy our application.

  1. Deploy it to own server.

  2. Deploy it on Salesforce Environment as an S-Control.

  3. Compile application as an Adobe AIR application and use the new runtime to use the application on the desktop without an application or Web-Server.

Deploy application on Salesforce Environment as an S-Control

To embed the Flex application as an S-Control , compile application for use in Salesforce by modifying the LoginRequest object in code to use the lr.server_url and lr.session_id arguments instead of lr.username and lr.password.

Now log in to Developer account of Salesforce.com and perform following steps.

  1. Click on Setup.

  2. Expand the Develop menu and create S-Control.

  3. Create a new one and give it memorable label and name.

  4. The type will be HTML

  5. In the filename field, browse and select the swf file.

  6. In the content area wirte the following code.

<embed src=”{!Scontrol.JavaArchive}” play=”true”   bgcolor=”#f3f3ec”  width=”100%” height=”100%” name=”FlexSalesforce”  Align=”middle”  flashvars=”session_id={!API.Session_ID}& server_url=    {!API.Partner_Server_URL_90}” loop=”false”allowScriptAccess=”always” type=”application/x-shockwave-flash”  pluginspage=”http://www.adobe.com/go/getflashplayer”</embed>

Here there are three Salesforce.com variables.

  1. Scontrol JavaArchive.

  2. API.Session_ID.

  3. API.Partner_Server_URL_90.

The last two are passed into the SWF when it loads in the browser. These maintain session state. So no need to login while running SWF file.

Now create Tab to house S-Control just created. Create a New Web-Tab with type of Custom S-Control. In step three , Select the S-Control just created to be the content on that tab. Click next through steps four and five. A new tab appear on the top of the screen.

Click on the tab. SWF file will run without required login details.

I hope you found this article useful. Let me know if there are any better ways to do the same thing.

Implementing Salesforce Login Solutuion With Flex 3

July 3rd, 2009 by chirag.babaria § 0

In this post, we will see how we can implement salesforce login with flex.

All you need is:

For the beginner steps for integration of flex toolkit for salesforce you can follow the steps given in below site

http://wiki.developerforce.com/index.php/Tutorial:_Creating_Flex_Salesforce_Mashups

While regarding the login method I will be describing as follows:

The namespaces to be included in flex builder for login are as follows:

connectivity

namespace for flex to salesforce

The Login function will be as follows:

Login

Login method for flex to salesforce

There is a common error while implementing login with salesforce, it will generate following error:

(com.salesforce.events::ApexFaultEvent)#0

bubbles = false

cancelable = true

context = (null)

currentTarget = (null)

eventPhase = 2

fault = (mx.rpc::Fault)#1

errorID = 0

faultCode = “Server.Error.Request”

faultDetail = “Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"]. URL: http://www.salesforce.com/services/Soap/u/11.0″

faultString = “HTTP request error”

message = “faultCode:Server.Error.Request faultString:’HTTP request error’ faultDetail:’Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"]. URL: http://www.salesforce.com/services/Soap/u/11.0′”

name = “Error”

rootCause = (flash.events::IOErrorEvent)#2

bubbles = false

cancelable = false

currentTarget = (flash.net::URLLoader)#3

bytesLoaded = 0

bytesTotal = 0

data = (null)

dataFormat = “text”

eventPhase = 2

target = (flash.net::URLLoader)#3

text = “Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0″

type = “ioError”

message = (mx.messaging.messages::ErrorMessage)#4

body = (Object)#5

clientId = “DirectHTTPChannel0″

correlationId = “026E48D3-1BFD-8AA6-A5D6-CDE8A1C8B7D8″

destination = “”

extendedData = (null)

faultCode = “Server.Error.Request”

faultDetail = “Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"]. URL: http://www.salesforce.com/services/Soap/u/11.0″

faultString = “HTTP request error”

headers = (Object)#6

messageId = “154CD995-435D-2011-47FB-CDE8A2A25895″

rootCause = (flash.events::IOErrorEvent)#2

timestamp = 0

timeToLive = 0

messageId = “154CD995-435D-2011-47FB-CDE8A2A25895″

target = (null)

token = (mx.rpc::AsyncToken)#7

message = (mx.messaging.messages::HTTPRequestMessage)#8

body = “<se:Envelope xmlns:se=”http://schemas.xmlsoap.org/soap/envelope/”><se:Header xmlns:sfns=”urnartner.soap.sforce.com”/><se:Body><login xmlns=”urnartner.soap.sforce.com” xmlns:ns1=”sobject.partner.soap.sforce.com”><username>[email protected]</username>

<password>xxxxxxxxxxxxx9KYz1Hmt965XXXXQcNVpjaq61</password></login></se:Body></se:Envelope>”

clientId = (null)

contentType = “text/xml; charset=UTF-8″

destination = “DefaultHTTP”

headers = (Object)#9

DSEndpoint = “direct_http_channel”

httpHeaders = (Object)#10

Accept = “text/xml”

SOAPAction = “”"”

X-Salesforce-No-500-SC = “true”

messageId = “026E48D3-1BFD-8AA6-A5D6-CDE8A1C8B7D8″

method = “POST”

recordHeaders = false

timestamp = 0

timeToLive = 0

url = “http://www.salesforce.com/services/Soap/u/11.0″

responders = (Array)#11

[0] (::SalesForceResponder)#12

result = (null)

type = “fault”

Solution

The Flex security model will require that you are running this on https server, unless you specify “http” using connection.protocol();
If your server is not HTTPS, but is HTTP, you can set that on the connection.

In addition, you will need to pass a security token appended to your password unless you have enabled the IP range in your network configuration.

Both will generate the io error you see.

If you are using “HTTPS” then you have to specify

connectionprotocol = “https”

And make sure that in salesforce.com by default “Require secure connections (https)” is checked

HTTPS

Sales force security setting

But if you are using “http”, then you have to specify

connectionprotocol = “http”;

And make sure that in salesforce.com by default “Require secure connections (https)” is checked to false.

HTTP

salesforce https setting

Introduction To Salesforce Platform

June 5th, 2009 by pankaj.lalwani § 0

What is Salesforce?

Salesforce.com is a vendor of Customer Relationship Management (CRM) solutions, which it delivers to businesses over the Internet using the software as a service model.

History

Origins

Salesforce.com was founded in 1999 by former Oracle executive Mac Benioff . In June 2004, the company went public on the New York Stock Exchange under the stock symbol CRM. Initial investors in salesforce.com were Marc Benioff,Larry Ellison,Halsey Minor, Magdalena Yesil and Igor Sill, Geneva Venture Partners.

Current status

Salesforce.com is headquartered in San Francisco, California, with regional headquarters in Dublin (covering Europe, Middle East, and Africa), Singapore (covering Asia Pacific less Japan), and Tokyo (covering Japan). Other major offices are in Toronto, New York, London, Sydney, and San Mateo, California. Salesforce.com has its services translated into 16 different languages and currently has 55,400 customers and over 1,500,000 subscribers. In 2008, Salesforce.com ranked 43rd on the list of largest software companies in the world.

Products and Services

Customer Relationship Management

Salesforce.com’s CRM solution is broken down into several applications: Sales, Service & Support, Partner Relationship Management, Marketing, Content, Ideas and Analytics.

Force.com Platform

Salesforce.com’s Platform-as-a-Service product is known as the Force.com Platform. The platform allows external developers to create add-on applications that integrate into the main Salesforce application and are hosted on salesforce.com’s infrastructure.

These applications are built using Apex (a proprietary Java-like programming language for the Force.com Platform) and Visualforce (an XML-like syntax for building user interfaces in HTML, AJAX or Flex).

AppExchange

Launched in 2005, AppExchange is a directory of applications built for Salesforce by third-party developers which users can purchase and add to their Salesforce environment. As of September 2008, there are over 800 applications available from over 450 ISVs.

Customization

Salesforce users can customize their CRM application. In the system, there are tabs such as “Contacts”, “Reports”, and “Accounts”. Each tab contains associated information. For example, “Contacts” has standard fields like First Name, Last Name, and Email.

Customization can be done on each tab, by adding user-defined custom fields.

Customization can also be done at the “platform” level by adding customized applications to a Salesforce.com instance, that is adding sets of customized / novel tabs for specific vertical- or function-level (Finance, Human Resources, etc) features.

Web Services

In addition to the web interface, Salesforce offers a Web Services API that enables integration with other systems.

Mobile support

In April 2009, Salesforce released a slimmed down version of their application for subscribers with Blackberry, iPhone, and Windows mobile devices

Languages

English, Dutch, Spanish, German, French, Finnish, Swedish, Japanese, Italian, Portuguese (Brazilian), Korean, Russian, Thai, Danish, Simplified Chinese and Traditional Chinese. Application and online help & training documentation are available in these languages.

Also, end user languages are available in Hungarian, Czech, Turkish, Polish, Lithuanian, Latvian & Estonian.

Other

Other technologies in use at salesforce.com are Resin Application Server, and the in-house technologies Apex (a Java-like programming language and programming platform) and S-controls (Salesforce widgets – these are predominantly based on JavaScript).

ADVANTAGES

Cloud Computing

These new ways of building and running applications are enabled by the world of cloud computing, where you access applications, or apps, over the Internet as utilities, rather than as pieces of software running on your desktop or in the server room. This model is already quite common for consumer apps like email and photo sharing, and for certain business applications, like customer relationship management (CRM).

Force Platform is the world’s first Platform as a Service (PaaS), enabling developers to create and deliver any kind of business application in the cloud, entirely on-demand Platform App and without software

Data-Centric Apps

A data-centric app is an application that is based on structured, consistent information such as you might find in a database or an XML file.We can find these data-centric apps everywhere, in small desktop databases like Microsoft Access or FileMaker, all the way to the huge systems running on database management systems like Oracle or MySQL. Unlike applications that are built around unstructured data, like plain text documents or HTML files, data-centric apps make it easy to control, access, and manage data.

  • Unparalleled time to value. Salesforce.com minimizes the risk involved in implementing business applications like CRM by eliminating the need for up-front capital investment, making the path to CRM success exceptionally short. Salesforce implementations usually take less than a month and rarely exceed three months, compared to 12 months or longer with client/server software. According to a recent study by Triple Tree and the Software and Information Industry Association (SIIA), on-demand deployments are 50 to 90 percent faster, with a total cost of ownership five to ten times less than installed software.
  • Less expensive initially-and in the long run. It’s easy to see why a multitenant, on-demand solution is much less expensive initially. There is no hardware to purchase, scale, and maintain, no operating systems, database servers, or application servers to install, no consultants and staff to manage it all, and no need for periodic upgrades.
  • Easy upgrades. Customers of on-demand applications benefit from instant deployment of new versions, which means the entire customer base is always on the latest version. Since customizations and integrations are maintained through upgrades, change management discussions can focus on taking immediate advantage of the new features and innovations available with each release.
  • Better service delivery. Due to the on-demand model’s tremendous economies of scale and our seven-year focus on service delivery, salesforce.com can provide higher service levels than the vast majority of companies can achieve on their own. We use the best technologies, policies, and procedures to ensure security at the facilities, application, and network level; to ensure maximum uptime and continuous availability; and to provide a performance record we’re proud of. In fact, we’re the only vendor who makes performance statistics available on a public site: http://trust.salesforce.com.
  • Better scalability. Successful businesses are continually changing and growing: Employee growth, transaction growth, the launching of new products and services, mergers and acquisitions, or any number of business events can dramatically and suddenly alter business needs.
  • Easier to customize. Users of on-premise solutions have no choice but to wait weeks or months for even minor modifications to their applications, and in some cases their requests are never met at all. The Salesforce application was designed from the beginning to make performing basic customizations to the user interface and underlying data objects easy, so that even business users could customize in minutes, without programming. Without the burden of fulfilling constant requests for minor customizations, IT is free to concentrate on performing more advanced customizations, such as associating specific behavior with objects that can be triggered by a wide range of system events.
  • Users are more satisfied and productive. A major reason on-premise deployments often fail is because of low user adoption-data that’s cluttered or difficult to get to quickly results in user resistance. Salesforce’s award-winning, easy-to-use interface has resulted in the highest user adoption rates in the industry.
  • Easier for administrators. Administrators can tailor processes and define how data is viewed for different departments and work groups, while ensuring that users can access only that data for which they are authorized. Salesforce’s ease of use extends to its administration functions. In fact, Forrester named Salesforce the “#1 On-Demand CRM Solution for Administration.”
  • Nurturing true value and innovation. By eliminating many of the problems related to traditional application development, the on-demand model frees developers to focus on developing solutions that deliver real business value. Salesforce.com supports developers with a host of on-demand development tools-including a point-and-click customization tool, toolkits for the most popular development environments, and the upcoming Force.com programming language-Apex-as well as the Force.com Developer Network. The Force.com community has grown rapidly, resulting in hundreds of innovative solutions that are made available to customers via the AppExchange directory, salesforce.com’s popular marketplace for pre-integrated, on-demand applications.

Disadvantages

Detractors claim that sales force management systems are:

  • difficult to work with
  • require additional work inputting data
  • dehumanize a process that should be personal
  • require continuous maintenance, information updating, and system upgrading
  • costly
  • difficult to integrate with other management information systems

Technologies Behind a Force Platform App

Multitenant architecture :

An application model in which all users and apps share a single, common infrastructure and code base.

Metadata-driven development model:

An app development model that allows apps to be defined as

declarative “blueprints,” with no code required. Data models, objects,forms, workflows, and more are defined by metadata.

Force PlatformWeb Services API:

An application programming interface that defines a Web service that provides direct access to all data stored in Force Platform from virtually any programming language and platform

Apex:

The world’s first on-demand programming language, which runs in the cloud on Force Platform servers

Visualforce

A framework for creating feature-rich user interfaces for apps in the cloud

Force Platform Sites

Public websites and applications that are directly integrated with your Salesforce organization-without requiring users to log in with a username and password

AppExchange directory

A Web directory where hundreds of AppExchange apps are available to Salesforce customers to review, demo, comment upon, and/or AppExchange directory install. Developers can submit their apps for listing on the AppExchange directory if they want to share them with the community.

Future

  • A shift from the mainframe to client/server systems, resulting in a move from legacy systems to packaged enterprise systems.
  • The rise of the PC, resulting in unprecedented user productivity-as well as a proliferation of data islands.
  • The rise of the Internet and perpetual network access, which led to an information explosion and changed the way millions of people work, play, and shop.
  • The emergence of Web services standards and technologies such as multitenant architectures.
  • The move towards service oriented architecture (SOA) approaches by most major software vendors, making integration with back-end systems easier.
  • The emergence of the on-demand model, which shifted the software market from an ownership to a “rental” model, freeing businesses from ownership hassle and expense. Salesforce.com is one of the most successful examples of this model, with 35,300 customers and more than 575 applications.

Applications Developed in Salesforce

All of the public web sites listed here have been built with Force.com Sites and run on the Force.com platform.

http://developer.force.com/sitesgallery

Currently, at digicorp we are developing an healthcare application on salesforce platform some brief overview about the application is as follows:

Used to store patient’s details like, Vital, Allergies, Medications order, Radiology order, Lab order, Referral order, Patient’s history etc. User can generate the messages for different type of orders to clerk/provider to enter into system/signoff respectively. It alos allows to store scanned documents of patients’ documents and generate the message to the provider as well. It allows to print the reports of Patient visits, orders, documents etc.

Original Content From:

http://www.salesforce.com

http://en.wikipedia.org/wiki/Salesforce.com

Where Am I?

You are currently browsing entries tagged with salesforce at Digicorp.