Force.com Flex Quick StartTutorialSalesforce, Summer ’15 @salesforcedocsLast updated: April 28, 2015
STEP 3: GENERATE YOUR ENTERPRISE WSDLWeb services are interfaces that enable the integration of applications over the Internet. The Web Services Descr
STEP 4: INSTALL AND LAUNCH FORCE.COM FLEXForce.com Flex installs as a standalone version of Adobe® Flash® Builder. The standalone version does not aff
STEP 5: CREATE A FORCE.COM FLEX PROJECT AND IMPORTYOUR WSDLForce.com Flex projects are Flex projects with additional ActionScript classes that add the
Connect to Data/Service Link7. Select Salesforce, then click Next.8. Select your enterprise WSDL, then click Next. Force.com Flex creates a Fiber mode
STEP 6: SET THE WINDOWEDAPPLICATION COMPONENTATTRIBUTESThe first component in the Force.com Flex desktop application template is a standard Flex Wind
STEP 7: CREATE THE ACCOUNT MANAGER LOGIN SCREENCreate the logic for the Account Manager login screen in the Main.mxml file. The login screen launche
</mx:Form><mx:ProgressBarvisible="{app.loginPending}"indeterminate="true"label="{statusMessage}"/></s:Pan
Indicates that the AccountsView file is part of the main UI••Passes the Integration component's F3DesktopApplication instance to the Account
[Bindable]private var statusMessage : String = "";private var _username : String;private var _password : String;protected function loginClic
<s:TextInput id="username" text=""/></mx:FormItem><mx:FormItem label="Password" direction="horizonta
© Copyright 2000–2015 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc.,as are other names and ma
STEP 8: CREATE THE ACCOUNT MANAGER USER INTERFACEAND APPLICATION LOGICCreate the Account Manager user interface in a new file called AccountsView.mxm
•Create—Displays the user interface for creating a new account•Edit—Displays the user interface for editing the details of an existing accountThe code
8. In the HGroup component, add the top bar containing the Create, Query, and Sync buttons. When a user clicks the buttons, theapplication logic cal
paddingTop="5"verticalAlign="middle"><mx:Image source="{StaticAssets.ACCOUNT_IMAGE_32}"/><s:Label text="
StaticAssets—A Force.com Flex component used to retrieve assets such as the account image to be presented in theUIs.••ToasterEvent—A Force.com Flex ev
14. Define the following set function. The function passes the F3DesktopApplication object to the AccountsViewcomponent using app="{app}&qu
16. Create the event handlers for the Save, Delete, and Cancel buttons that display when the user edits an account record Use thefollowing functions:•
currentState = "default";}17. Create the event handlers for the Save and Cancel buttons that display when the user is creating an account re
}protected function commitToDB( managedObject : IManaged ) : void {_desktopWrapper.save(managedObject ) // After saving, go to edit mode and renderthe
}}protected function onQueryResult( rows : ArrayCollection ) : void {_desktopWrapper.releaseQueryResults( _gridDataProvider );// populate datagrid_gri
CONTENTSCreating Your First Force.com Flex Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Step 1: Designate Yourself an Of
xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"xmlns:flexforforce="http://flexforforce.salesforc
},function( result : F3Message ) : void {LOG.error( "syncWithServer failed: " + result.toString());}));}protected function onQueryClick() :
StaticAssets.REPORT_IMAGE_32,"Account deleted",status.description));}protected function onEditCancel() : void {_app.setStatus( null );// cle
protected function commitToDB( managedObject : IManaged ) : void {_desktopWrapper.save(managedObject ) // After saving, go to edit modeand render the
}protected function onQueryResult( rows : ArrayCollection ) : void {_desktopWrapper.releaseQueryResults( _gridDataProvider );// populate datagrid_grid
<s:VGroupwidth="100%"height="100%"paddingBottom="10"paddingLeft="10"paddingRight="10"paddingTop=&
<s:Button label="Save" click="onEditSaveClick()"/><s:Button label="Delete" click="onEditDeleteClick()"
STEP 9: TEST THE APPLICATIONThe Account Manager application is ready to test.1. Verify your machine has an active Internet connection.2. In Flash Buil
Data Conflict Notification8. Click the green button and select Resolve in the status bar to launch the conflict resolution interface.Conflict Resoluti
SUMMARYIn this tutorial, you created a simple Force.com Flex application that gives users the ability to view and edit Force.com data both withand wit
CREATING YOUR FIRST FORCE.COM FLEX APPLICATIONForce.com Flex is a framework for creating Flex-based desktop and Web applications that leverage Salesfo
The Account Manager User InterfaceClicking Create presents a user interface for creating a new account, with the fields appearing in full edit mode. C
Force.com Flex components simplify the process of accessing Force.com logic and data, and allow developers to easily add commonlyrequired functionalit
STEP 1: DESIGNATE YOURSELF AN OFFLINE USEROnly Salesforce users with the Offline User permission can develop or use Force.com Flex apps.1. In Salesf
STEP 2: CREATE AN OFFLINE BRIEFCASE CONFIGURATIONYour Force.com Flex desktop application can access only the Force.com data specified in your assigned
Commentaires sur ces manuels