Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Access Quick View Form attributes of one entity on another entity

Posted on by 108

Hi All, 

I had a requirement to hide fields in a quick view form.

EntityA: new_service (Field: new_examstaken - lookup); EntityB: new_exam (Fields: new_exam, new_examtype, new_completeddate, new_faileddate, new_examstatus)

I have created a quick view form of Exam on Service Entity. When a user cleared his exam we shouldn't show "new_faileddate" field on the form.

To achieve this, using below syntax, but getting null values in the output.

var quickViewExamControl = Xrm.Page.getControl("examQF_examQF_new_exam_new_faileddate");
if (quickViewExamControl .getAttribute().getValue() == null)
{
quickViewExamControl .setVisible(false);
}

Referenece: https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg334266(v=crm.8)

Thank You, Sai Krishna

  • Suggested answer
    Nishant Rana Profile Picture
    Nishant Rana 55 Microsoft Employee on at
    RE: Access Quick View Form attributes of one entity on another entity

    With Dynamics 365

    nishantrana.me/.../

  • SaiKrishnaGudluru Profile Picture
    SaiKrishnaGudluru 108 on at
    RE: Access Quick View Form attributes of one entity on another entity

    @Goutam, thank you for the helpful information. Seems, the syntax I have is not supported in D365 (8.2).

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Access Quick View Form attributes of one entity on another entity

    Hi Krishna ,

    To hide show quick view control you need to go with different quick view form and show/hide the form section of quick view form which you need. Apart from that I don't see any other options which will work in new UI as well.

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Access Quick View Form attributes of one entity on another entity

    Hi Krishna,

    Retrieve the quick view form entity data by using Xrm.WebApi.retrieveRecord  or use CRM rest builder tool to prepare the code to retrieve the  quick view form data which already suggested above, as the way we used to get the quick view control , attribute  in older version   is not working in the dynamics 365 latest UI . So do not go with the old way because accessing control of quick view form will  not work in new dynamics 365 UI.

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-webapi/retrieverecord

  • SaiKrishnaGudluru Profile Picture
    SaiKrishnaGudluru 108 on at
    RE: Access Quick View Form attributes of one entity on another entity

    @LeoAlt thank you for the information. I am unable to access the quick view attributes using above references too, getting "null" output.

  • SaiKrishnaGudluru Profile Picture
    SaiKrishnaGudluru 108 on at
    RE: Access Quick View Form attributes of one entity on another entity

    Thank you @Ravi for the prompt response, but I was looking for to hide/show "Quick View form fields"

  • LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: Access Quick View Form attributes of one entity on another entity

    Hi Sai,

    If you want to control Quick View with JS code, you should refer to the following links.

    Similar requirementhttps://community.dynamics.com/crm/b/thinkdynamicdodynamic/archive/2017/04/10/access-quick-view-form-values-using-javascript-crm-2016

    Demo code:https://www.magnetismsolutions.com/blog/jordanhohepa/2018/08/23/using-javascript-to-set-quick-view-form-visibility-in-dynamics-365

    Hope it helps.

    Best Regards

    Leo

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Access Quick View Form attributes of one entity on another entity

    This may help you: www.dnetsoft.com/how-to-get-quick-view-attribute-in-ms-crm

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Access Quick View Form attributes of one entity on another entity

    Hi Krishna,

    There is no supported JavaScript method which can you use to get the fields from the quick view control. You need to use Web API to retrieve the required details from your related entity and based on that show hide quickview control.

    Here is the list of moehtods supported for Quick View Control

    docs.microsoft.com/.../formcontext-ui-quickforms

    You can CRM Restbuilder to build the WEB API request and retrieve the details of Exam entity.

    carldesouza.com/dynamics-crm-rest-builder

    You can download the tool here- github.com/.../releases

    Hope this helps.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans