Currently the plugin does check to see if it’s trying to save data into the wp_capabilities
field, and if it is, it tries to make an array that WordPress will then serialize.
Are you indicating that this doesn’t work in your situation, or that you need it to do something in addition to this?
Hmm, that doesn’t seem to be working correctly for me then. I’m syncing to a TEXT field in Salesforce. I then remove a permission value (along with the preceding semicolon) and then I go to the user’s record in WordPress and do a manual “pull from Salesforce”. The value that gets pulled back to the wp database is the text value.
Does my Salesforce field need to be a picklist(multiselect) instead?
I am trying to map to the wp_capabilities field.
-
This reply was modified 1 month, 1 week ago by esowers.
Oh, I just realized. I am using User Role Editor plugin to manage permissions and assign multiple user roles. Could that be the issue?
I think it does need to be a picklist in Salesforce, yes. The plugin does check for that first. It makes the assumption that roles would go to a picklist. Then I think it will work with the User Role Editor.
You could also use a developer hook to make it work with a non picklist field.
Awesome! Got it working. I think the plugin was caching the field type of TEXT from salesforce so when I changed the field type it wasn’t pulling over the correct values. I deleted the mapping and re-mapped it and now it’s serializing the values correctly from the multi-select list in Salesforce.
Thanks for your help!
Great! I’m not necessarily opposed to letting it map roles to non-picklist fields, but it feels like it would require a lot of thought to make sure it doesn’t mess up other things. For now I think we’ll keep it as it is, although it does flag some documentation needs I don’t think I’ve articulated before.