I have a Master-detail grid
Master primary key - empid Detail primary key - empid, deptid
When I add a new row in detail IG, the empid is populating with t1001 instead of the master grid's empid value.
Is there any way we can fetch the master empid into detail empid.
Try disabling the Primary Key flag for the Detail IG. Apex IG auto-populates PKs like t1001 only when we have Primary Key flag enabled.