Saturday, May 8, 2010

Generate PDF in Landscape mode

Most of us would have generated PDFs out of visualforce pages, but most of us would be facing issues with styling the PDF pages. Especially when it comes to changing the orientation of the pages. 

I saw somewhere how to do it and thought that it should be shared so that everyone out there can use this simple mechanism to achieve this. Its no trick, but one of a very less known CSS feature. @page directive.

Using @page directive you can control a lot of properties of the PDF document that you generate. For e.g. you can set 
  • orientation to Landscape (default is Portrait). 
  • margins of page
  • page number
Example code:-

@page {
        size:landscape;
        margin:0.1cm 0.3cm 0.1cm 0.3cm;
    }


To know more about it and explore it, read this informative article on W3schools site (http://www.w3.org/TR/css3-page/)

If anybody faces any challenge, do let me know? At least I can look into it :)
   

Friday, April 30, 2010

VmForce or JVMForce?

Attended VmForce webinar yesterday (I wrote this article earlier, got time today to publish it). The first things that came to my mind was "Java again?". I thought that in SFDC we were (if some may still think that we have not) crossing the by-lanes of conventional technologies and were moving forward to next generation platform.

Everybody would agree that with PaaS (Platform As A Servive) and DaaS (Development As A Service) Salesforce is moving closer and closer to General Applications development platform. Giving opening to java code would not only bring new workforce and clients for salesforce. This will also help a larger developer community access to salesforce which is what is the key to success for all the development platforms, something what Microsoft did with .Net, Apple did with iPod/ iPhone etc.

With Java(in vmforce), SFDC is entering deeper and deeper into enterprise grid applications and with all the benefits of cloud it can certainly break the barrier.

Having said all that, as we are extensively using Java in VmForce, it would be better to nickname it as JvmForce.

Sunday, March 28, 2010

SOQL: Improvements

How many of you have faced problems understanding the basic difference between Object relationships (as provided by Salesforce.com) and Table/entity Relationships (as provided in conventional RDBMS)?
I am sure many of you must have faced the same problem, at least I did. But lately there are some new enhancements in SOQL which narrows down these differences. For e.g now in SOQL you can have INNER JOINS and you can group data using the famous GROUP BY clause.

So, what is the big deal?

Well, yeah it’s not a big deal that you can
- do more in SOQL and remove your earlier code using which you used to retrieve data in case of INNER JOINS
or
- group your data using GROUP BY clause and have conditions on it using HAVING clause
or
- use some new Date functions in your SOQL query to filter your data (which you used to do using Apex code).

So, in all it means richer SOQL and lesser use of Apex for these purposes.

Interested, then checkout a very good article written by Dr. Umit Yalcinalp
http://wiki.developerforce.com/index.php/A_Deeper_look_at_SOQL_and_Relationship_Queries_on_Force.com

Saturday, March 6, 2010

Salesforce New User Interface Theme: Personal Review











Following are Steps to switch ON the new theme:-
1. Go to Setup
2. In App Setup section go to Customize> User Interface
3. Check "Enable New User Interface theme"
4. Click on Save (Click ok on confirmation box).

Tadaa!!! the new theme is ON, but you would be able to see it only when you click on any tab


As anybody else would be, I myself was too much excited about it as it was long due. But with all the high expectations, I must say that the final outcome is not so exciting. As far as what I have seen, its just a change from the CSS perspective. The only advantage I see is that there is lesser use of images and more use of CSS, which would help pages to get loaded faster. Apart from that everything else seems to be the same. Strangely, Setup section is still in the old theme and has not been upgraded to new theme.

Just a suggestion for SFDC team, we are looking out for more rather than the slight changes in CSS.

Tuesday, February 23, 2010

SFDC: CRM or XRM

Salesforce.com or SFDC, the term seems to be synonymous to CRM systems. Some people know that Salesforce.com is just another CRM tool, while others compare it with other (primitive) CRM systems and argue the statement. But, I believe that keeping all the capabilities of Salesforce.com and force.com platform, SFDC has moved a few steps ahead of CRM and can be called an XRM system (X = Any/Multiple).

By XRM, I mean a system which is just not inside the boundary of CRM but can fulfil/achieve more functionalities as required in Finance, Insurance, and HR etc.
All of you, who might have worked on Saleforce.com and especially the force.com platform and played around Apex and VisualForce must have realized the fact that apart from using standard Salesforce objects e.g. Account, Opportunities, Leads etc. (which are integral part of CRM system), we can now create a lot of other custom objects as per our need (Bank Transactions, Payments, Invoice, Invoice line items etc.).
Furthermore, with the power of Apex we can build custom logic for these custom objects and achieve the required functionalities.

Finally, with the coolest tool/feature/technology of Force.com "VisualForce" we can create really groovy and intuitive UI applications. I have myself created a few such applications which have all the custom functionalities and were catering to different business scenarios other than CRM. Furthermore, with the addition of Salesforce Sites feature, I believe it was another jewel in the crown. We can now expose all our functionalities to outer world with minimal efforts.
Following are certain applications built using Salesforce sites:-
Created by Me:-

Note: - To test it, perform the following:-
a) Click on Admin
b) Enter Username as "test" and password as "test1234"
c) Click on Login
d) Add/Edit/Update Pages and contents
e) Associate contents with pages,
f) Get back to home page to view the changes.


To view other sites created by others go to http://developer.force.com/sitesgallery
Do post you comments and share your thoughts on the same.

Friday, February 19, 2010

Development time in SFDC vs. .Net and Java

Well I suppose, it is the most sellable statement in SFDC's list of features/advantages of using SFDC over .Net and Java. Well, having worked on SFDC I believe that there is more to it.

SFDC is one of the most innovative platforms and gives us all (almost) what we need to develop enterprise level business applications. With a lot of out-of-the box functionalities and innovative On-demand platform, it is my platform well I suppose it is the most sellable statement in SFDC's list of features/advantages of using SFDC over .Net and Java. Well, having worked on SFDC I believe that there is more to it.

SFDC is one of the most innovative platforms and gives us all (almost) what we need to develop enterprise level business applications. With a lot of out-of-the box functionalities and innovative On-demand platform, it is my platform of choice for developing business applications. But, as I mentioned that there are hidden elements in SFDC development.

SFDC Configuration:- With Object relationships, Vanilla UI (default), Formula fields, Roll-up summary fields, Workflows, Approvals, email templates and many more out-of-the-box features, SFDC is a very rich platform. The features are easy to use and configure and lets us of choice for developing business applications.

SFDC Customization:- with powerful apex and Visualforce and awesome SOAP web Services its a truly class customization platform.

Myth:- Development in Salesforce is 5+ times faster than .Net or Java

Fact:- This is a contextual statement. In case the development is done using SFDC Configuration only, then offcourse I would say its 5 (or even more) times faster than .Net or Java. The deployment is seamless and you don't even need to worry about performance and security. But, when you get into realm of custom logic (Apex) and custom UI (visualforce), I have seen that it is not like that. It has to go through all the same stages and has to face same conventional issues.

So, I would say that development in SFDC is faster than that in .Net and Java but saying that it is 5 times is contextual based on how you choose to develop in SFDC.

Popular Posts