Hi All,
I'm looking for help from all of the developers here.
I have two custom entities Examination (sc_examination) and Prescriptions (cs_prescription)
The examination has a lookup filed called sc_patient and sc_spceialist which contains the patient record and the doctor's record.


from the Examination entity, you can create a new prescription record.
However, when I create a new prescription record, doesn't auto-populate the patient and the doctor's lookup fields, so I have to add them manually every time even though I'm using a subgrid inside the examination entity.

I'm looking for a Jscript that I can use on the Prescription form on Load to get the Patient and the Doctor and populat them into the prescription so I can save some time looking for the patient and the doctor.
Any help is appreciated.