Tuesday 22 January 2013

Clock in a visualforce Page

**************CLOCK in a visual force page******************* 

                 quiet interesting !! is it ??????????

=================================================================================
>                Yes it can be done with help of some basics in html , with this you can even create   a     stop watch or countdown timer  TOO  but for now i came up with an example of clock which will be displayed on the visual force page and which can be stopped even .
And here is the code for it ...........!!!!!!!!
==========================================================================================
VISUAL FORCE PAGE:-
==========================================================================================
<apex:page id="thePage" showHeader="false"><html>
<body>
<center>
<div id="clock"></div>
</center>
<br/>
<div align="right">
<button onclick="int=window.clearInterval(int);" id="stop">Stop Clock</button>
</div>
</body>
<script type="text/javascript">
var int = self.setInterval("clock()",1000);
function clock()
{
    var d=new Date();
    var t=d.toLocaleTimeString();
    document.getElementById("clock").innerHTML = "<B>" + t + "</B>";
}
</script>
</html>
</apex:page>
============================================================================================
You can play around with "set Interval" and "clear Interval" functions to create a stop watch or countdown timer code.

Hope this was interesting and useful.

Happy Clouding.. :)...:)...:)

Monday 21 January 2013

Tips For Salesforce ADMIN


 #### So Here's my First Post 

I think this will help Mostly the salesforce Admins..... Did you Ever think about making mistakes ? ofcourse they are routine at the starting level . so when you want to edit an autonumber field or Change a User's Email Address Without Sending a Confirmation Request here's is the solution for it


1. Auto-number Switch

Myth: Auto-number fields only ever contain the numbers which the field has generated on its own.
                The truth is, you can jam anything you want in there! The loophole you use to do so is that you can change the "field type" of a field from Auto-number to Text or from Text to Auto-number. So for instance, you can change an Auto-number to Text temporarily so you can modify some of the numbers that had been assigned previously, and then change it back to Auto-number so it will continue assigning numbers to new records.  Give it a whirl, it's fun! Be careful though, while you have the type set to anything other than "Auto-number" records will be created without getting a number assigned.

2. Change a User's Email Address Without Sending a Confirmation Request

Usually, when you change the email address on a user record an email is sent to the new value asking the user to confirm the change. Only when the confirmation link in the email is clicked will the change be reflected in salesforce. This happens regardless of how you update the email address… manually, API, etc. There is no way around it… or so I thought! Turns out, if you change the email address AND check the "Generate new password and notify user immediately" checkbox (all the way at the bottom of the edit screen) then the email address gets committed right away, no confirmation needed! Obviously the catch is that the user then gets sent a new password… so it's not any better in some situations. 
******You know how it is, you tell a user what their username is in the sandbox and tell them to use whatever password they were using in production when the sandbox was last refreshed… and they don't remember and ask you to reset it… so you'd have to explain that they need to confirm a change to their email first… you get the picture. Now you just update the email and get them a new password in one shot*******