Wednesday, December 12, 2007

Show Shared Exchange Calendar CRM Microsoft - Part II

Like i show you in other post, share outlook calendar can be simple, dont try code over code over code, try simple, you dont lose your head and clients will like.
Like this litle example:


Ok first step is go to isv.config.xml and add:

<Entity name="appointment">
<ToolBar >
<Button Title="Shared Calendar" ToolTip="Shared Calendar" Icon="/_imgs/ico_16_4003.gif" JavaScript="window.open('http://crm:5555/custom/outlook.htm','Shared Calendar','width=550,height=540,top=150,left=150,toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0');" />
</ToolBar>
</Entity>

after add this lines create a html, "Outlook.html" page that will suport you outlook views

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>

</head>
<style type="text/css">
body { font-size:11px; font-family:"Tahoma,Verdana"; margin:0px; border:0px; background-
color:#eef0f6; cursor:default; }
td { font-size:11px; font-family:"Tahoma,Verdana"; }
td.sec { width:100%; color:#000000; font-weight:bold; padding-left:0px; padding-
bottom:2px; text-overflow:ellipsis; overflow:hidden; }
td.bar { border-bottom:1px solid #000000; }
td.req { font-weight:bold; color:#9f2409; overflow:hidden; text-overflow:ellipsis;
padding-top:5px; }
td.rec { font-weight:bold; color:#466094; overflow:hidden; text-overflow:ellipsis;
padding-top:5px; }
table.layout { table-layout:fixed; width:100%; }
input { font-size:8pt; width:10%; height:19px; border:1px solid #7b9ebd; }
button { filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=
#ffffff, EndColorStr=#cecfde); cursor:hand; font-size:11px; padding-left:5px; padding-right:
5px; border:1px solid #7b9ebd; }
</style>
<body style="background-color: #EEF0F6;">

<body>



<select id="Agendas1" name="btnShowCal1" style="font-family: tahoma,Arial;font-size: 11px;">
<option value ="Calendar">Calendar</option>
<option value ="\\Public Folder\Every Public Folder\Marketing Departmant">Marketing Departmant</option>
<option value ="\\Public Folder\Every Public Folder\Conference Room" selected>Conference Room</option>

</select>

<select id="Agendas2" name="btnShowCal2" style="font-family: tahoma,Arial;font-size: 11px;">
<option value ="Calendar">Calendar</option>
<option value ="\\Public Folder\Every Public Folder\Marketing Departmant">Marketing Departmant</option>
<option value ="\\Public Folder\Every Public Folder\Conference Room" selected>Conference Room</option>
</select>
</BR>
<BUTTON id="cmdButton" onclick="ViewResource();">Calendário 1</BUTTON>

<BUTTON id="cmdButton1" onclick="ViewResource1();">Calendário 2</BUTTON><BR>

<object classid="clsid:0006F063-0000-0000-C000-000000000046" id="OVCWPQ1" width="1" height="1">
<p id="parah"></p>
<param name="Folder" value="\\Public Folder\Every Public Folder\Conference Room"/>
<param name="Namespace" value="MAPI"/>
</object>

<object classid="clsid:0006F063-0000-0000-C000-000000000046" id="OVCWPQ2" width="1" height="1">
<p id="parah"></p>
<param name="Folder" value="\\Public Folder\Every Public Folder\Conference Room"/>
<param name="Namespace" value="MAPI"/>
</object>


<script language=VBScript>
Sub btnShowCal1_onchange
OVCWPQ1.Folder = btnShowCal1.value

End Sub
Sub btnShowCal2_onchange
OVCWPQ2.Folder = btnShowCal2.value

End Sub
Sub ViewResource()
If cmdButton.Value = "Calendário 1" Then
cmdButton.Value = "Esconde Calendário 1"
OVCWPQ1.Width = "100%"
OVCWPQ1.Height = "300px"
cmdButton.Focus()
else
OVCWPQ1.Width = "1"
OVCWPQ1.Height = "1"
cmdButton.Value = "Calendário 1"
end if
end sub
Sub ViewResource1()
If cmdButton1.Value = "Calendário 2" Then
cmdButton1.Value = "Esconde Calendário 2"
OVCWPQ2.Width = "100%"
OVCWPQ2.Height = "300px"
cmdButton1.Focus()
else
OVCWPQ2.Width = "1"
OVCWPQ2.Height = "1"
cmdButton1.Value = "Calendário 2"
end if
end sub
</script>

</body>

</html>
Post a Comment