Topic by Larry Edwards
I have a custom process (but could do same code in custom Connect PHP Script page) that updates SalesProduct based on import into "dummy" table (because Import wizard does not allow update of that table)
It is working except when i mess with either FOLDER ID or AdminVisablity so
1) How to set Folder ID the sample code has it commented out because it says it does not work. Here is my snippet where $obj (is custom process object) and $sales_prod is a FETCH() of sales product based on ID and my FOLDER LEVEL1 ID is a valid current Folder ID:
if(isset($obj->folder_level1_id) && is_int($obj->folder_level1_id))
{
$sales_prod->Folder->ID = intval($obj->folder_level1_id);
}
2) How do you RESET or NULL out the current Array Set of AdminVisability? I need to do this to start over as i have 10+ interfaces and my import determines which of those should be visible YES/NO so i can't RE-use what is there as the indexes have nothing to do with Interface IDs. So here is my "NULL" out statement which doesnt seem to work:
foreach($sales_prod->AdminVisibleInterfaces as $visAdmin){
$visAdmin = array();
}