web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

JScript for Mapping Lookup fileds

(0) ShareShare
ReportReport
Posted on by 410

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.

pastedimage1611314434349v1.png

pastedimage1611314656133v3.png

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.

pastedimage1611314767447v4.png

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.

I have the same question (0)
  • Verified answer
    chrispytwist Profile Picture
    235 on at

    Hey Kiril,

    have you mapped these fields in the 1:N relationship manager? No JS needed for this (which also means less maintenance if APIs change)

    This might help: readyxrm.blog/.../

  • Radoslavov Profile Picture
    410 on at

    Hi,

    Yes, I tried, but you cannot map one file to multiple fields.

    The connection here is Examination - Prescription (taking the patient value from the examination and filled to the prescription)

    So there is no 1:N connection between the patience filed in the prescription and the patienceid.

    This is why i need a custom solution.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans