﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ladysign Dev Blog &#187; salesforce</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/salesforce/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 01 Feb 2010 09:44:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Salesforce trick: load hidden s-control on every page</title>
		<link>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-trick-load-hidden-s-control-on-every-page/</link>
		<comments>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-trick-load-hidden-s-control-on-every-page/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:38:14 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hidden]]></category>
		<category><![CDATA[s-control]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=67</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>This is one of my first Salesforce hacks; this trick will learn you how to load an hidden S-Control on every Salesforce p[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>This is one of my first Salesforce hacks; this trick will learn you how to load an hidden S-Control on every Salesforce page:</p>
<p>My S-Control is &#8220;hidden&#8221; using a style sheet command. The &#8220;hint&#8221; that there is an embedded S-Control is a message on the sidebar that reads &#8220;Field Level Help Enabled&#8221;.</p>
<p>Basically, you write an S-Control, then create a custom home page component of type &#8220;HTML&#8221;, choose the &#8220;show HTML&#8221; checkbox, and type in the following code:</p>
<pre class="brush: xml;">
&lt;iframe src=&quot;/servlet/servlet.Integration?lid=XXXXXXXXXXX&quot; style=&quot;display: none&quot;&gt;&lt;/iframe&gt;
</pre>
<p>After you save this change and add it to the home page sidebar, it will execute on any page that includes the sidebar. The &#8220;lid&#8221; parameter is the ID of the S-Control to execute.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-trick-load-hidden-s-control-on-every-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Salesforce: Cases css stylesheet</title>
		<link>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-cases-stylesheet/</link>
		<comments>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-cases-stylesheet/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:29:15 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[stylesheet]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=63</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Use this CSS stylesheet for your custom S-Control pages.<br />
Your mod will look like a real Salesforce styled page. (cases ta[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Use this CSS stylesheet for your custom S-Control pages.<br />
Your mod will look like a real Salesforce styled page. (cases tab style)</p>
<pre class="brush: css;">
body {
	font-family:'Arial','Helvetica',sans-serif;
	font-size:75%;
	line-height: 1.6em;
	background: #fff;
	padding: 0;
}

h1,  h2 { font-size: 14px; font-weight: bold; }
h3 { font-size: 100%; background: #DDB929; display: block; padding: 1px; color: #fff; }
h4 { font-size: 80%; background: #DDB929; display: block; padding: 1px; color: #fff; }

label { font-weight: bold; text-align: right;  }
span { }
strong { font-weight: bold; color: #f00; }

a { color: #000; }

hr { color: #eeecd1;  border: 1px solid;}

div {
	background: #F3F3EC;
	margin: 5px;
	padding: 5px;
	border: 2px Solid #eeecd1;
	width: 95%;
}

li{
	 display: block;
	 margin: 2px 2px 2px -20px;
}

table {
	width: 100%;
	background: #F3F3EC;
	font-size: 12px;
	border-top: 5px Solid #E5C130;
	border-bottom: 2px Solid #E5C130;
	border-left: 1px Solid #eeecd1;
	border-right: 1px Solid #eeecd1;
	padding: 0px;
	margin: 0px 0px 10px 0px;
}

th { background: #eeecd1; height: 19px; width: 20%; } // TODO dynamic

td {
	height: 19px;
	border-bottom: 1px solid #eeecd1;
	width: 20%;
	margin: 0px 2px 0px 2px;
	padding: 0px 5px 0px 2px;
}

.classy0 { background-color: #eeecd1; }

button, .btn {
	background-image:url('/img/bgButton.gif');
	background-position:left top;
	background-repeat:repeat-x;
	border-color:-moz-use-text-color #5C5D61 rgb(92, 93, 97) -moz-use-text-color;
	border-style:none solid solid none;
	border-width:medium 1px 1px medium;
	color:#FFFFFF;
	cursor:pointer;
	display:inline;
	font-family:'Verdana','Geneva',sans-serif;
	font-size:80%;
	font-weight:bold;
	padding:1px 3px;
}

.relatedListBlock{
	float: left;
}

.end {
	clear: both;
}

.hide {
  	display: none;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-cases-stylesheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce Query Functions</title>
		<link>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/</link>
		<comments>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:25:23 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[s-controls]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=60</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>These handy Salesforce functions I used a lot, for doing Salesforce database queries.<br />
You can use these functions in your[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>These handy Salesforce functions I used a lot, for doing Salesforce database queries.<br />
You can use these functions in your S-Controls:</p>
<pre class="brush: jscript;">
/**
 * Get an array with all the possible fields names from a object
 * @param objectType object to get the fields from.
 * @return array with all the fieldnames of the given object
 */
function getFields(objectType) {
	var describeSObjectResult, fields, i;

	describeSObjectResult = sforce.connection.describeSObject(objectType);
	fields = [];
	var length = describeSObjectResult.fields.length;
	for (i = 0; i &lt; length; i++)
	fields[i] = describeSObjectResult.fields[i].name;

	return fields;
}

/**
* Result handler, forwards you to the detail page,
* if there is an error give alert message.
* @param result - can be a (sf query) object, or a textmessage string.
* @param idVal - the id of the detailpage to forward to.
*/
function resultHandler(result, idVal){
	var msg = &quot;&quot;;

	if (typeof(result) == &quot;object&quot;) {
		if (result[0].getBoolean(&quot;success&quot;)) {
			msg = &quot;&quot;;
		} else {
			msg = &quot;Error: &quot; + result[0];
		}
	} else {
		msg = result;
	}
	if (msg != &quot;&quot;){
		alert(msg);
	}
	self.location.href = &quot;/&quot; + idVal;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-query-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Salesforce date/time functions</title>
		<link>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-datetime-functions/</link>
		<comments>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-datetime-functions/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 21:15:39 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[salesforce]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[crm]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[s-controls]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=57</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Oh I loved my previous project, where I had to work with the CRM: Salesforce.<br />
Salesforce coding was fun: S-Controls (ifra[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>Oh I loved my previous project, where I had to work with the CRM: Salesforce.<br />
Salesforce coding was fun: S-Controls (iframes), Salesforce Ajax (Javascript with Salesforce Query Language) and Apex (Java like Salesforce serverside coding).</p>
<p>These are handy Salesforce date/time functions which you can use in your S-Controls:</p>
<pre class="brush: jscript;">
/**
* Return the current time
* @return javascript date time object
*/
function getCurrentSalesForceTime(){
	var currentDateTime = sforce.connection.getServerTimestamp();
	currentDateTime = setStringToDateTime(currentDateTime.timestamp);

	return currentDateTime;
}

/**
* Set Javascript Date Time to Salesforce Date Time;
* @param dateTimeObj - date time string
* @return salesforce date time object
**/
function setStringToDateTime(dateTimeObj){
	var dateTimeObj;

	if (dateTimeObj != null) {
		dateTimeObj = sforce.internal.stringToDateTime(dateTimeObj);
	}

	return dateTimeObj;
}

/**
* Set Salesforce Date Time Object to Javascript Date Time
* @param dateTimeObj - Salesforce date time object
* @return string date time
**/
function setDateTimeToString(dateTimeObj){
	var dateTimeObj;

	if (dateTimeObj != null) {
		dateTimeObj = sforce.internal.dateTimeToString(dateTimeObj);
	}

	return dateTimeObj;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/salesforce/salesforce-datetime-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
