<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks Payam,<div><br></div><div>But that's not the reason (though I tried & created another Scrip for the "On Create" condition as well, and that did not make any difference........ Currently:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>1) my emails do come into RT, </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>2) a Ticket gets generated (or an already created Ticket's content gets updated)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>3) However, the Custom Field for the Ticket never gets updated</div><div><br></div><div>Trouble is, my Scrip is not even being seen by RT...and since I am not familiar with all the objects, my guess is I am calling the wrong object [i.e., (LoadByName(Name<span class="Apple-tab-span" style="white-space:pre"> </span>=> $cf_key) could potentially be the wrong call for setting a Custom Field of incoming Tickets]:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>#Custom Field Name to be Set</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>my $cf<span class="Apple-tab-span" style="white-space: pre; "> </span>= RT::CustomField->new(RT->SystemUser);</div><div><br></div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>#Set Ticket's CustomField, based on Subject line!</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>foreach $cf_key (keys %cf_hash)</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>if ( $t_subject =~ /$cf_key/i ) {</div><div><span class="Apple-tab-span" style="white-space: pre; "> </span><b>$cf->LoadByName(Name<span class="Apple-tab-span" style="white-space: pre; "> </span>=><span class="Apple-tab-span" style="white-space: pre; "> </span>$cf_key;</b></div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>}<span class="Apple-tab-span" style="white-space: pre; "> </span></div><div><br></div><div>..Again, my Custom Fields are already defined (about 10 of them). All I need to do is to Update a new Ticket with the proper Custom Field, based on the Subject line of the Ticket.</div><div><br></div><div>Thanks,</div><div>Behzad</div><div><div>On Aug 26, 2011, at 5:30 AM, Payam Poursaied wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Tahoma, sans-serif; color: rgb(31, 73, 125); ">Hi Behzad<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Tahoma, sans-serif; color: rgb(31, 73, 125); ">As you mentioned, you want to update both on create and correspond. The scip parameters says it would only trigger on correspond<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Tahoma, sans-serif; color: rgb(31, 73, 125); ">Have you tried to modify the condition to “On Create” or clone this scrip and change the condition of new one to “On Create”<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Tahoma, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Tahoma, sans-serif; color: rgb(31, 73, 125); ">I didn’t go through your code but that condition make sense<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Tahoma, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-family: Tahoma, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-width: initial; border-color: initial; border-left-style: solid; border-left-color: blue; border-left-width: 1.5pt; padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 4pt; "><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span>My code below (Scrip) simply parses the Subject line of incoming tickets, and "should" attempt to create (& update) an incoming Ticket based on what shows up in the Subject line.<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Problem:<span class="apple-tab-span"> </span><o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span>Tickets do get created as I send my emails to RT, yet they do not get set with the Custom Field (from a pre-defined set of custom fields), and Custom Field stays as "no value"<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">A) my Scrip parameters (using the web interface)<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">======================================<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Scrip Description:<span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span>OnCreateAddCF<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Condition:<span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span>On Correspond<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Action:<span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span>User Defined<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Template:<span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span>Correspondence-XYZ<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Stage:<span class="apple-tab-span"> <span class="Apple-converted-space"> </span></span>TransactionCreate<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div></div></div></div></span></blockquote></div><br></div></body></html>