Valid bean fields

Hi,

I’m using the scripts from https://community.sugarcrm.com/thread/19736 this thread.

There is this code snippet

//map everything else that doesn't need special processing
            //don't map sf_ fields, those are placeholders for something else they are not valid bean fields.
            if(isset($field_map[$sf_field]) && !preg_match('/^sf_/',$field_map[$sf_field])){
               //echo("{$field_map[$sf_field]}={$field_value}<p>");
               $bean_to_load->$field_map[$sf_field]=$field_value;
            }

What does that mean? What I have to use here?

Are you importing from SalesForce?

It seems sf_fields are SalesForce fields. That code seems to be removing all fields that don’t have a match in SuiteCRM fields. But you would have to ask whoever wrote that script, not me… :slight_smile:

Ok, I will ask her.

Yes, I’m importing from Salesforce