Discussion posts and replies are publicly visible
looks like "deptId" is a required field (either in your DB table or in your CDT) and such has not been provided in the data you're attempting to write.
I am able to generate deptid and add that to request table as foreign key but I am not able to generate requestid in request table even though I have made that field as autogenerate
I don't believe this has anything directly to do with the error displayed in your original post. That error concerns only "deptId" as i mentioned in my earlier comment.