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

Custom Process - PHP script - Save() not saving (1 Comment)

$
0
0

Topic by Mark Bradley

Hi folks,

I have the following code in a function in a Custom Process.

        $md = $org::getMetadata();
        $cf_type_name = $md->CustomFields->type_name;
        $md2 = $cf_type_name::getMetadata();
        $org->CustomFields->c = new $md2->c->type_name;
        
        $org->CustomFields->c->eligible_future_vacan = 0;
        $org->save();

The eligible_future_vacan is a Yes/No custom field, currently set to Yes (Which, when output via print_r shows a value of 1). Ive tried setting the field to "No", 0, "0", "", null and 2. However, with all of these values tested and no error showing up from the script (The snippet is enclosed in a try/catch), the field value on the Organization entity never changes from Yes.

Anyone have any suggestions on what I can try/might be doing wrong?

Cheers,

Mark
 


Viewing all articles
Browse latest Browse all 2504

Trending Articles