<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>retrying.. I am pretty sure there is someone in the community who can tell me what I am doing wrong ..</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<b><br>
</b></div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>I am trying to set a Custom Field Value during the creation of a ticket with the following piece of code. But the value ("SN-1234") is not getting added to custom field</div>
<div>(BTW, I already pre created the Custom Field for the Ticket object and made it Global). </div>
<div><br>
</div>
<div>What am I doing wrong? Is SetIncludeContentForValue the correct API call?</div>
<div><br>
</div>
<div>=================</div>
<div>
<div>my $cf = RT::CustomField->new($RT::SystemUser);</div>
<div>$cf->Load('Store Number');</div>
<div><br>
</div>
<div>unless ($cf->id) {</div>
<div>  $RT::Logger->error( "Couldn't load custom field " . "Store Number");</div>
<div>}</div>
<div><br>
</div>
<div>$cf->SetIncludeContentForValue ("SN-1234");</div>
<div><br>
</div>
<div>@retValues = $ticket->Create( Queue => 'My Store Queue', Subject => 'Test Ticket for Store 1234 ', CustomField => $cf);</div>
<div>=================</div>
<div><br>
</div>
<div>Thanks </div>
<div><br>
</div>
<div><br>
</div>
<div>~                                                                                                                                                                                                                                                          
  </div>
<div>~                                                                                                                                                                                                                                                          
  </div>
<div>~                                                                                                                                                                                                                                                          
  </div>
<div>~                                                                      </div>
</div>
</div>
</div>
-------- RT Training Sessions (<a href="http://bestpractical.com/services/training.html">http://bestpractical.com/services/training.html</a>) * Washington DC, USA ˜ October 31 & November 1, 2011 * Barcelona, Spain ˜ November 28 & 29, 2011</span>
</body>
</html>