Hi Oliver,
When it comes to custom fields, there are a few things to consider:
1. Are you using a plugin to add the fields to the post type? What plugin, if so? There are many methods to add fields in WordPress, and this plugin supports the standard methods, which many plugins use, but if you’re using a non-standard method you may have to write a plugin and use the developer hooks for your additional fields.
2. Do the fields have at least one value in the database? By that I mean, let’s say you have a field called “test_field” on the user object. If there are no users with a value for “test_field” it won’t appear in the database, and so it won’t appear in the field map dropdown. But if there’s at least one user that has a value, it will show up (after clearing the plugin cache if applicable).
Hope that helps.
Hi Jonathan,
I have added the fields via the WordPress standard method: in the back end I created a new custom field called internalid and added a value.
I did not use a plugin for that.
It is a custom post type I created wit CPT PlugIn.
Each post of this type has this custom field created and a value added. So not a single posz exists where this custom field is empty.
In your plugin my custom post type is selectable in the drop down but the custom field “internalid” ist not displayed when I try to setup a fieldmapping.
I can get the values of my custom field via get_post_meta().
Best regards
Oliver
@mgmtcircle okay, here’s what I did to try to reproduce:
1. Download the CPT UI plugin and create a new post type. I made sure it supports Custom Fields.
2. Create a new post for that type. It has an ID of 414. I saved it as a Draft.
3. In my functions.php, I created a new custom field like this: add_post_meta( 414, 'internalid', 'test', false );. I published the post after this.
4. Go to the Salesforce plugin settings and clear the cache.
5. Create a fieldmap for my new custom object.
At this point, I see internalid in the dropdown. It’s close to the end of the list of choices.
Wow, the “Clear the Cache” function did the job. I did not find it at first as I was not aware it is there. The Link is so tiny.
This helped! Thanks a lot for the quick support.
Best reagrds
Oliver
Glad to hear it worked. I’ll mark this as resolved, for now.