<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</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>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>
</body>
</html>