<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
hi,<br>
<br>
i don't know if it can help, but i don't use the ->ISO on setDue.<br>
$self->TicketObj->SetDue($duedate); // when $duedate =
"2009--11-23 00:00:00";<br>
maybe this can help,<br>
regards,<br>
<br>
On 23/11/2009 11:20, TONY JOHN - ERS, HCL Tech wrote:
<blockquote
cite="mid:B863B1878CB80042A5BE1290B8FD6BB1E5C2D4AD@BLR-HCLT-EVS05.HCLT.CORP.HCL.IN"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Hi,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Please find below the
Custom action clean up code for Seting
DueDate based on a condition:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">use strict;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">use warnings;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">my
$date1=$self->TicketObj->FirstCustomFieldValue('CI
Valid Till');<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">my
$date2=$self->TicketObj->FirstCustomFieldValue('Date In Gabriel');<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">my($mm1,$dd1,$yyyy1) =
split /\//, $date1;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">my($mm2,$dd2,$yyyy2) =
split /\//, $date2;<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">my $duedate =
$yyyy1."-".$mm1."-".$dd1." 00:00:00";<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">$self->TicketObj->SetDue(
$duedate->ISO);<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">return 1; <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Why is that the SetDue
isnt working? Any help?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Regards,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span
style="font-size: 10pt; font-family: Arial;">Tony John<o:p></o:p></span></font></p>
</div>
<table>
<tbody>
<tr>
<td bgcolor="#ffffff"><font color="#000000">
<pre>DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------</pre>
</font></td>
</tr>
</tbody>
</table>
</blockquote>
<br>
</body>
</html>