Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Java Script To Lookup entity record and populate lookup field

Posted on by

Hi,

I am having real issues with this, so hopefully someone can help me. (FYI names are funny as fiddling in our sandbox environement 

I have 2 Entities; competitor & liss_lvproduct. These two have an intercept entity (Manual Many to Many) called new_competitorproductanalysis. This entity has 1 lookup field to each of the entities above. This intercept entity provides our sales staff with information about a competitor and the specific product and gives hints on how to sell our Product over the competitor. So an info/help entity.

Attached to out contact entity we have a 4th Entity new_productfactfind this entity is completed by the user while on the phone to the contact and records info on when the factfind took place and additional info such as how ready/willing they are to use us for the product, how they chose a supplier for that product etc.

It is working really well, however while on the phone users find it time consuming to jump to through the entities to get to the new_competitorproductanalysis for info. My idea is once they have selected a competitor and liss_lvproduct, these details are used to find the relevant new_competitorproductanalysis record and populate it in a lookup field liss_analysis on the productfactfind form allowing the user to jump straight to the information record.

Any one have any ideas on how I can do this via Java Script or Workflow. We are on CRM  2016 upgrade 1 online.


Cheers

*This post is locked for comments

  • G Sav Profile Picture
    G Sav on at
    RE: Java Script To Lookup entity record and populate lookup field

    Thanks Ryan, I did think of the lookup option, but was trying to reduce work for our sales guys. Think I might use this as a phase one. I did know about the quick view idea as used it elsewhere, however had not even thought about using it on this entity. So thanks for the memory jog, as that would make like a lot easier for our Sales Guys.

  • Suggested answer
    Ryan Maclean Profile Picture
    Ryan Maclean 3,070 on at
    RE: Java Script To Lookup entity record and populate lookup field

    Hi G Sav,

    I think you could accomplish this by using Dependent Lookups, without the need for any javascripts or workflows:

    On your Product Fact Find form, I assume you already have a Lookup field each to the Competitor and the liss_lvproduct entities?  If so, and depending on the order in which these are filled in, you could create a series of cascading lookups.

    For example, if you fill in Competitor first, then on your second lookup (for liss_lvproduct) you would amend the "Related Records Filtering" on the Field Properties to only show records where the liss_lvproduct contains the Competitor.  Then you would add another lookup to the competitorproductanalysis entity, and amend the related records filtering only show records where the the competitorproductanalysis contains liss_lvproduct.  You could then have a quick view form on your productfactfind entity that shows the relevant details for the competitorproductanalysis

    Cheers,

    Ryan

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans