Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How to set Lookup Id after record creation in Ms CRM?

Posted on by 5

Step : 1.-  I have created Entities a. Hospital  b.Doctor c. Patient Above age 60 d. Patient Below age 60.

Step :2 - By calculating age of Patient , The Record should in Patient Above age 60 either Patient Below 60. 

Step :3 -  I have given  lookup  relationship of   Doctor in Hospital Entity, and evenly created for i have created Lookup Doctor in Patient Above 60 & Patient Below 60.

step :4  - Doctor Lookup should be Set in Patient Entities while creating record.

I have done up to Step 3, But I Stuck in Step 4.

Can i Please Give Me Suggestions. Thanks in Advance.

*This post is locked for comments

  • Suggested answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,227 on at
    RE: How to set Lookup Id after record creation in Ms CRM?

    Hi pradeepnaga,

    I would suggest you to create pre-operation plugin on create of patient entity.

    While creating record simply pass doctor lookup as parameter to context based on your condition.

  • Suggested answer
    PS Profile Picture
    PS 23,577 on at
    RE: How to set Lookup Id after record creation in Ms CRM?

    Hi Pradeep

    Assumption 1: you are adding patients from hospital record

    Go to settings>>Hospital entity>>expand>> 1 to N relationships>> Open relationship with patients

    On top left navigation you will see 'Mapping'>>click here and map doctor field of hospital to doctor field of patient.

    Now everytime you create a patient from hospital, doctor lookup will be auto-populated.

    Assumption 2: you are adding patients from doctor record

    Go to settings>>Doctor entity>>expand>> 1 to N relationships>> Open relationship with patients

    On top left navigation you will see 'Mapping'>>click here and map doctor/primaryid field of entity to doctor field of patient.

    Now everytime you create a patient from doctor, doctor lookup will be auto-populated.

  • TNS Profile Picture
    TNS 1,195 on at
    RE: How to set Lookup Id after record creation in Ms CRM?

    Hi,

    If I am right you want to fill up doctor lookup field which is in patient entities form when the patient entities record get created.

    So can you tell how you are creating patient entities records like by workflow,plugin and by which condition you will choose doctor entity record in patient entity form.

  • pradeepnaga Profile Picture
    pradeepnaga 5 on at
    RE: How to set Lookup Id after record creation in Ms CRM?

    Can Give by using Javascript or Workflow

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans