This topic contains 6 replies, has 0 voices, and was last updated by pcutler 7 years, 7 months ago.
-
AuthorPosts
-
December 27, 2016 at 2:44 pm #1374
CREECEI am trying to load a custom plugin implementation in a map reduce script and I keep receiving the following error: UNABLE_TO_FIND_IMPLEMENTATION_1_FOR_PLUGIN_2
which looking that up in help says: “Either there is no such implementation of the provided plug-in type, or the plug-in type does not exist.”
This is not the case as there is a 2.X plugin type AND implementation specified on the manage plugins page. Are there issues with plugins currently?
Code:
log.debug({ title: ‘Implementations 2.x’, details: plugin.findImplementations({type: ‘PLUGIN_TYPE_ID’}) });
This is a cached copy. Click here to see the original post. -
December 28, 2016 at 10:17 am #1375
cblackburnI tested this out and it works for me. Is looks to me like you have a typo in the “type” property. The value should be same the “ID” field on your custom plugin type record. The value will always start with “customscript”, for example “customscript_foo_bar_plugin”. Also note that the API call above will not return anything for plugin types or implementations that are not in a “Released” state.
{type: ‘PLUGIN_TYPE_ID’ }
Good luck!
-
December 28, 2016 at 10:54 am #1376
CREECEI have PLUGIN_TYPE_ID as a placeholder. I have a plugin type that starts with customscript that I am using in the type property. The status on both the type and implementation of the type is Released. I can see my plugin implementation as a checkbox in the mange plugins page. When I run the code i mentioned with the plugin type id, i get an empty array as my output. I am expecting the script ID of the implementation. Is there something special that needs to be done on the type record other than specifying the method used?
I’ve also tried loading the plugin directly using the ids and that does not work either.
-
December 28, 2016 at 11:18 am #1377
cblackburnIn addition to what you mentioned, one would need to add the Plugin type to the Script record in order to whitelist it for that script. Also, just to be clear, the “type” value should be the ID of the Custom Plugin Type as opposed to the Custom Plugin Type Implementation.
Hope that helps.
-
December 28, 2016 at 11:18 am #1378
CREECEI got it working. The issue was that I did not have the plugin type specified on the Map/Reduce Script. I did see this after poking around but I did not see this information anywhere. Would be nice to see it as a note in the API doc that the code will not work unless you have the plugin type specified on the script record that is using the plugin.
-
December 28, 2016 at 11:19 am #1379
cblackburnGood to hear, I’ll pass your feedback along.
CREECE replied on 12/28/2016, 11:22 AM: Thanks again for the assistance.
-
April 12, 2017 at 2:40 pm #1380
pcutlerOriginally posted by CREECE
View Post
I got it working. The issue was that I did not have the plugin type specified on the Map/Reduce Script. I did see this after poking around but I did not see this information anywhere. Would be nice to see it as a note in the API doc that the code will not work unless you have the plugin type specified on the script record that is using the plugin.
Seconded – I didn’t find this step in Help or SuiteAnswers, so thank you for contributing it on the forum.
-
AuthorPosts
You must be logged in to reply to this topic.