I'm relatively new to Salesforce development.
Right now, I'm making a voting app that contains two objects; a contestant object and a vote object. Each object has the following fields:
Contestant: Contestant Name - Text(80), Vote Count - Roll-Up Summary (COUNT Vote)
Vote: Contestant, - Master-Detail(Contestant), Vote Name - Text(80)
Both include a 'Created By' and 'Last Modified By' field as well. Here, when I create a vote (after creating contestants), the vote count for that contestant will increase by one successfully.
I've created 6 sample contestants, and I want the user to cast their votes through a survey flow. In this flow, the user is directed to a survey in which they are asked to put their name in as well as their vote, both in text boxes (in which they will type the EXACT NAME of the contestant; I have done this with radio options and this didn't work). Then a new vote record gets created in which the inputs the user puts in will be the values of the fields, as shown below:
The flow has three different segments; the first one which is a screen that asks for the user's name (VoterName), and the contestant they are voting for (Contestants), the record creation and a 'goodbye' screen.
However, when I try to run this flow, I keep getting this error by the time I fill in my information in the first two screens:
Error element Cast_Vote (FlowRecordCreate). This error occurred when the flow tried to create records: MALFORMED_ID: Contestant: id value of incorrect type: Whatever the user fills out for the first screen. For details, see API Exceptions.
I'm thinking the reason for this is because Contestant__c is a master-detail data type, and it's already taking in a text type and there's a conflict there. Which is weird, because shouldn't it transfer over to the actual Contestant Object, and insert it as a name which is already a text type?