Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

Custom Process to update custom field (1 Comment)

$
0
0

Topic by ilamukky

Content

Hello! I have a Custom Process on UpdateAnswer event. It works fine, but fails to update a custom field ("major_change", a Menu Items field). The test harness shows the field correctly set, without errors, but when the Custom Process runs, the custom field is not saved in answer object, while other fields are correctly set and saved. I am using Connect v1_2 and RN version November 2012.

$md = $answer::getMetadata(); 
$cfType = $md->CustomFields->type_name;
$cfMetadata = $cfType::getMetadata();
//$answer->CustomFields->c = new $cfMetadata->c->type_name;  
//This part is shown in RN guide, but if I uncomment it, 
//the Custom Process doesn't start at all 

$answer->CustomFields->c->major_change = new RNCPHP\NamedIDLabel; 
$answer->CustomFields->c->major_change->LookupName = 'Rewritten';

$answer->save();   

What can be wrong?... Thanks to all

Version

November2012

Viewing all articles
Browse latest Browse all 2504

Trending Articles