Notifications
Announcements
No record found.
Hi,
Want to get control of the look up modal and the body using JQuery.
Please help me with this!!!
Regards,
Susritha.
Hi Partner,
Could you kindly share more details about your requirement, why you need to get the lookup field by Jquery when opening the modal?
As we know we need to use $("#fieldname) to get field in portal form, and even though you opened the lookup modal, you could also get the lookup filed by this code.
And if you want to do actions on the lookup modal, you could find its ID or class name by F12 developer tools.
Best Regards,
Leo
The required is to add records to the lookup modal based on the odata Query.
When I was trying with the Custom modal then I can able to get control of it and I can add records to the modal.
$('#myModal').find('.modal-body .table tbody').append('<tr data-id="' + data.value[i].knowledgearticleid + '" data-entity="knowledgearticle" data-name="' + data.value[i].title + '><td data-th="Select" aria-label="Select " tabindex="0" role="checkbox"> <span class="fa fa-fw"></span></td><td data-type="System.String" data-attribute="title" data-value="' + data.value[i].title + '" tabindex = "0" data-th="Title" aria-label="' + data.value[i].title + '" > ' + data.value[i].title + '</td ></tr>');
but not for the lookup modal in Entity form.
Hi partner,
Thanks for your details.
The modal in portal form could be found by $("table[role$='grid']") under its Div.
And then you need to add your custom data into the table by its format.
Can you give more details about $("table[role$='grid']") ) under its Div.
You could get it in your own environment by Jquery code and find more details.
In my case, there are 3 girds in my form so I will found 3 elements by $("table[role$='grid']") ), that is the reason we need to find the gird under the special DIV.
After you get the table element, you could add tr and td in it to add your custom records.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 49 Super User 2025 Season 2
Daniyal Khaleel 27 Most Valuable Professional
Soundari 15