Pages

Wednesday, December 18, 2013

Issue with DBAmp (SQL Server to Salesforce Integration tool) upgrades

If you are using DBAmp from http://www.forceamp.com/ , and if you plan to upgrade your current version to the latest version please make sure you restore the dbamp keys in your windows registry.

Shocked - ye we too went through this pain recently.. when we updated our DBAmp to the latest version 2.17.7 it wiped out all the existing dbamp registry keys which was added during the initial installation.

This had an impact on our case assignment rules. wondering how ? here is the reason...

one of the dbamp registry key is UseDefaultAssignment.
if this key is not there or if its not set to true, the leads/cases created in salesforce thru dbamp will not trigger the assignment rules and all will be sitting with the default user you configure in dbamp.

here is the explanation for this registry key from the DBAmp document
This entry controls whether DBAmp adds an AssignmentHeader to all requests made to salesforce.com. A checked value forces DBAmp to include the header.
Note: Setting this registry switch forces DBAmp to add the header to all DBAmp operations. If you need finer control then use the optional SOAP header of the SF_BulkOps stored procedure.

so make sure after you upgrade your existing dbamp installation you check your dbamp registry keys and restore them as it was before the upgrade.

good luck.

Friday, November 22, 2013

Dreamforce 2013 Developer Keynote Highlights

Just finished watching the developer keynote from this years dreamforce..

here are some of the key highlights that i noted down from this hour long video..

Force.com Command Line Interface (CLI)
its an open source tool to help developers access the salesforce instance and all of the objects (standard, custom), run soql queries, import & export of metadata, etc..

Introduction
http://blogs.developerforce.com/developer-relations/2013/11/announcing-the-command-line-interface-for-force-com.html

Some more details
http://www.wadewegner.com/2013/11/a-command-line-interface-for-forcecom/

source code and setup
https://github.com/heroku/force

API.. API.. API.. API...
one of the buzzword througout this dreamforce is API.. most of the stuff in salesforce platform is now API enabled.. this will be the base for cross platform, device independent, application development.
since most of the integration with API's happens over http, xml & json, there are not client libraries to ease the integration. couple of libraries highlighted are

Ruby Client for REST api
https://github.com/ejholmes/restforce

Node.js REST api wrapper for force.com
https://github.com/kevinohara80/nforce

d3.js - to visualise & chart the data from analytics api
http://d3js.org/
example - https://medium.com/p/c87517ab52b1

Salesforce1
This is probably the biggest anouncement for developers this year... its a complete rebranding and futurisitc strategy to put the force.com platform as mobile first & api driven.. this is an umbreall of force.com, heroku and exact target and other supporting components put together. we now have a new developer site for the salesforce1 platform.. which has a good collection of documentation & other resources around the platform and api's..
http://developer.salesforce.com/

Mobile packs and Mobile SDK
these are already released in phases over the period and got a special mention in the keynote to hightlight how it fits in the Salesforce1 platform. the mobile packs covers the development with existing client side web technologies like HTML5 with javascript libraries like Angular, Knockout, jQuery, etc.. and the Mobile SDK covers the iOS and Android based development

Heroku Connect
if you have any of your apps running in heroku and interfaces with salesforce, then this will be a handy app to sync the data between your postgres database and salesforce data. you can create mapping between these 2 databases and enable syncing (uni directional or bi directional)

you can try heroku connect by logging in here
https://app.cloudconnect.com/

you can find more details on this here
https://blog.heroku.com/archives/2013/11/19/tools-for-integrating-heroku-apps-with-salesforce

Demo Time
some of the cool stuff shown in the demo in keynote are

  • Mobile Cards in page layouts
  • creating a simple chart with analytics api, add it to object page layout, show it in mobile devices
  • Enhanced Lookups in page layouts
  • Flexi pages
  • creating Quick actions (publisher actions) and using it in Salesforce1 mobile app

Finaly you can watch the developer keynote video here
http://www.youtube.com/watch?v=KELBWQIVcfk

will try to cover more on the Salesforce1 platform in future blog posts.. lets learn this together :-)

Monday, November 18, 2013

Salesforce1 and SalesforceA apps (iPhone,iPad,Android) initial look and review

Salesforce1
I recently updated Salesforce1 app in my iPad,iPhone and HTCOne Andriod phone and played around with the apps for a while... Here's my initial feedback on it..

For beginners, note
  • Salesforce1 is not a new app.. Its an upgrade of an existing app "Salesforce Chatter Mobile" which was there close to 3 years and got matured over the period..
  • Salesforce1 is not just a new glossy mobile app... its part of a platform/framework 
  • Its a collection of a set of development tools including our existing force.com tools, emerging mobile sdk, heroku tools, newly aquired ExactTarget stuff,
  • it has lots of focus on API based development, ability to integrate/communicate with any app/platform/device
  • setting up new direction in salesforce app development 

Its too early to write anything on the entire platform.. so i m just focusing on the mobile/tablet app here

So whats new or different from previous apps/versions ..


here's the list of new features listed in the app 

  • Improvised search - ability to search across the feeds including records, people, groups & conversations
  • Make use of publisher actions that you created in your org from any device with this app
  • Custom list views - now you will be able to see your custom list views not just the recently viewed records
  • Access all your objects (standard, custom, apps)
  • notifications pane on the right
  • ability to mobile optimized access appexchange apps 
  • ability to create new records from the list view 

after going thru the listed features, few things that I expected but couldn't find..

  • We cannot edit our own user details (name, photo, etc.. ) - need to use the SalesforceA app for this 
  • Not possible to edit groups even if we own it
  • thou it says we can access apps and objects, I found only objects. - to get additional stuff we need the customize the navigation menu by logging into the desktop site and changing the settings under Setup ->  Administration -> Mobile Administration -> Mobile Navigation.
  • List views are restricted. As usual by default it shows the recently viewed records with option to select custom list views. and just below recently viewed, you will see the custom list view names.
  • The custom list views shows the records in "Google Now" style mini post cards - but we cant change the number of records showing up, what fields to display on the cards, the sort order, etc..
  • When the navigation pane is opened, you cannot scroll thru the main pane.. It jus freezes..
SalesforceA
This app is an admin friendly app that goes along with Salesforce1 app - 

  • primarily to manage users 
  • edit, unlock, freeze, deactivate user accounts
  • reset passwords
  • manage permission sets
We have a Rocket Launcher at the bottom of this app.. that takes us to the community page of ideas, answers, events, user groups .. not sure what the actual intent is but its adds a fun/game element to the app..

Rest of the Apps
So what happens to Salesforce Classic, Salesforce Touch, old version of Chatter Mobile... not sure.. need to wait and watch

Bottom Line
I can see the direction of getting into a unified app experience with the vision of customer engagement and better experience which is good... but the current set of multiple apps from salesforce to do different things is a killer..

Sunday, October 20, 2013

Adding Cloud Symbol to your Profile Names

To all my fellow cloud lovers,
if you want to add the cloud symbol to your social profile (twitter, facebook, linkedin, google+) names, get the character map from this link and paste it next to your profile name... bingo...
http://www.fileformat.info/info/unicode/char/2601/browsertest.htm 

Monday, August 05, 2013

salesforce developer certification

if you are someone just getting started for the salesforce developer certification & looking for good learning materials, practice tests, references, books, preparation guide to the certification exam,

here is a very useful blog with a perfect learning curve

getting salesforce certified developer certification

apex pageblocktable, commandlink, commandbutton, actionRegion, actionStatus, actionFunction, param

here is my recent experience in salesforce visualforce page development...

Requirement 
  • to insert a new section to add/remove items to an order in an existing order entry page... 
  • based on the item price, the order totals, tax, shipping etc. should get updated..

Design
  • item description & price are captured through Input Text fields. 
  • "add item" action triggered when a command button is clicked, 
  • the item description & price are added to the pageblock table along with a "remove" commandlink in the last column. 
  • The totals section is updated to include the item price.
  • "remove" action is triggered when the commandlink is clicked in any of the pageblock table row, the corresponding item is removed. 
  • the totals section is again updated to exclude the removed item price.

Catch
looks simple right, the catch is the recalculation of the totals was already done using javascript. so i need to hook into the existing javascript/jquery functions once the item is added/removed from the pageblock table.

also, the re-rendering of the pageblock table and the totals section is done using ajax.

Code
<apex:pageBlockSection title="Add/Remove Items" columns="1" collapsible="false" rendered="{!(Order.Type == 'CargoItems')}">
<apex:actionRegion immediate="true">
<apex:actionStatus id="updateTotals" onstart="block('{!$Component.MainForm}');" onstop="recalcTotals(); unblock('{!$Component.MainForm}');" />
<apex:actionFunction name="addItems" action="{!addCargoItem}" status="updateTotals" reRender="itemsTable"/>
<apex:actionFunction name="removeItems" action="{!removeCargoItem}" status="updateTotals" reRender="itemsTable">
<apex:param name="rowId" value="" />
</apex:actionFunction>
<apex:pageBlockSection columns="3" showHeader="false">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Item Description"></apex:outputLabel>
<apex:inputText value="{!itemDesc}" styleClass="itemFields itemDescField" />
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Item Price"></apex:outputLabel>
<apex:inputText value="{!itemPrice}" styleClass="itemFields itemPriceField" />
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:commandButton value="Add Item" onclick="addItemRow(); return false;" >
</apex:commandButton>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:actionRegion>

<apex:pageblockTable id="itemsTable" styleClass="itemTable" value="{!CargoItems}" var="cItem" >
<apex:column headerValue="Item Description">
<apex:outputText value="{!cItem.Description}"/>
</apex:column>
<apex:column headerValue="Item Price">
<apex:outputText value="{!cItem.Price}" styleClass="cargoItem" />
</apex:column>
<apex:column headerValue="">
<apex:commandLink value="Remove" onclick="removeItemRow('{!cItem.Id}'); return false;">
</apex:commandLink>
</apex:column>
</apex:pageblockTable>
</apex:pageBlockSection>

please be mindful in placing the actionRegion... it should just surround your input value controls that needs to be passed in an ajax request. if you place the pageblocktable inside the apexRegion, then the table rows will not be rendered properly.

Flow
  • "add" commandbutton and "remove" commandlink both calls javascript functions,
  • run any validations in the javascript functions & then call the actionFunctions
  • actionFunctions are tied to the controller methods which adds/removes records to the collection
  • pageblock table is binded to the cargotItems collection in the controller
  • when the call returns back from controller to actionFunction, actionStatus is fired which calls the existing javascript recalculate method to update totals section & also re-renders the pageblock table 


hope this helps someone who has a similar sceanrio...

Thursday, July 25, 2013

Salesforce Force.com IDE Startup Error jvm terminated. exit code=-1

If you are starting Force.com IDE either after a fresh installation or an upgrade,

You might see a scary big popup with this error jvm terminated. exit code=-1. dont runaway.
One of the ways to simply fix it is to open up your force.com config file and remove the unwanted configurations added at the end.

The force.com config file is located in your installation directory. by default it goes into
C:\Program Files\salesforce.com\Force.com IDE\forceide.ini

open up the file using a text editor and comment the configuration keys at the end
(add # at the start of each line)
#-vmargs
#-Dfile.encoding=UTF-8
#-Xms256m
#-Xmx1024m
#-XX:PermSize=128M
#-XX:MaxPermSize=512M

here is the other options to fix the issue
http://stackoverflow.com/questions/11220594/salesforce-ide-starting-error

for me even after updating this, it was still failing with another error  
java.lang.RuntimeException: Application "" could not be found in the registry

to fix this error open up the config file
C:\Program Files\salesforce.com\Force.com IDE\configuration\config.ini

and comment the line
#eclipse.application=


ideally it should have the list of applications. not sure why its blank, so just comment it and force.com ide works perfectly after that... hope this helps some of you


Saturday, April 27, 2013

My New HTC ONE

Huuuuuu Huuuuu..... got my new HTC ONE from Optus delivered today... Silver 32GB model..

Inserting the new SIM, Transferring the contents (Contacts, Media, Messages) from my iPhone 4 using HTC Sync Manager is pretty straight forward...

checkout the unboxing...