I’m attempting to add a Suggestion Box to a Skuid page and I’m receiving a strange error message as seen below:
Vote Type being blank I assume is just a UI issue between Salesforce and Skuid since it’s a button in Salesforce. I tried to replicate that promote vote button using the Run Multiple Actions - Vote: Create new row(s) > Type: Up.
Athough I don’t know the standard Salesforce functionality of these objects, I’ve figured out some things about the Vote, Idea, and IdeaComment objects in my exploring. I was able to reproduce your error when I tried to create a new record on a Vote model connected to an idea. However, when I created a new record in Vote based on an idea comment it saved (by connected I mean in the parentid field of the Vote object). In Salesforce can you vote on an idea or only idea comments?
You might be able to use a custom field renderer to show the vote type picklist. The values are there; they just don’t show. You can see the Vote Type picklist values in Chrome console using skuid.model.map(), looking at the Vote object, and then looking under fieldsMap -> Type -> picklistEntries. This community post deals with a custom picklist renderer, as does this one. Since your values in the picklist are present, but oddly blank, you’ll probably have to follow the example of the first tutorial and create a new picklist value set (instead of just adding on to the current set).
Thank you for the advice! I tried using the custom field renderer and that worked. Now I can choose to Up or Downvote an Idea and IdeaComment.
Now I just need to figure out that weird Invalid id: h error.
Hmmm, I think something is going on with how the objects are linked. If I set a condition on the Vote model and make its parentid look at a specific ideacomment, I can create a new row on the Vote model and get it to save with an up or downvote. However, after the row has saved I see that it’s parent id has been changed to the ideacomment’s comment body. From then on, I can’t add any more rows. If it’s messing with the parentId behind the scenes that might be why it’s finding an invalid id. Unfortunately, I’m not really sure how to fix that.