function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hitesh Patil 843Hitesh Patil 843 

Create a Question and Answer in Lightning Component

I want create a question answer form where answer are written by user. The Question are taken from the question object by the iteration but while storing the answer the answer is store for particular question id only. Not as per the question sequence.
ANUTEJANUTEJ (Salesforce Developers) 
Hi Hitesh,

This is just an idea but the thought is that you could have an answer object that could act like junction object between  the user and question object so that you can store the question id answer and the user id so that it can be fetched as per the use case.

I hope this helps and in case if this comes handy can you please choose this as best answer so that it can be used by others in the future.

Regards,
Anutej
Hitesh Patil 843Hitesh Patil 843
Hi Anutej,
Thanks for replying me but I have an issue with the id only. The answer are store as per the hard coded question Id only for single single question.
hiteshpatil843@gmail.com these is y mail id if you have an example Can you share with me.
ANUTEJANUTEJ (Salesforce Developers) 
I have not implemented any scenario as such but that was an idea so I thought to share it here.
Hitesh Patil 843Hitesh Patil 843
Thanks Anutej , I had on that way only but I had stuck in Id for junction object.
ANUTEJANUTEJ (Salesforce Developers) 
Can you mention as of what the issue you are facing with the id?
Hitesh Patil 843Hitesh Patil 843
Anutej can you share me you mail id so that I can share my code to you.
Sreenivasula Reddy 5Sreenivasula Reddy 5
Hi Hitesh, Can you please share the component and controller part of code to my mail it is srireddyd@gmail.com