- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 12:31 AM
Hi Community,
How to pass reference field value from html to client script of ui page?
HTML code:-
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 01:21 AM
Please add below code in HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<label for="${jvar_app_query}" onclick="" dir="">${gs.getMessage("Parent Entity")}</label>
<g:ui_reference style="width:20px" query="active=true" name ="entity_name" id="entity_name" table="x_kpm79_kpmgi_iogc_kpmgi_iogc_entity_management_base" />
<button type="button" class="button button1" style="background-color: #04AA6D" onclick="test()">Ok</button>
</j:jelly>
And below code in client script :
function test() {
var entityName = $("entity_name").value;
alert(entityName);
}
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 12:41 AM - edited 01-04-2024 12:45 AM
Hello @Ankita Kolhe,
Please use below code in the client script:
var entityName= $("entity_name").value;
alert(entityName);
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 12:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2024 01:21 AM
Please add below code in HTML:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<label for="${jvar_app_query}" onclick="" dir="">${gs.getMessage("Parent Entity")}</label>
<g:ui_reference style="width:20px" query="active=true" name ="entity_name" id="entity_name" table="x_kpm79_kpmgi_iogc_kpmgi_iogc_entity_management_base" />
<button type="button" class="button button1" style="background-color: #04AA6D" onclick="test()">Ok</button>
</j:jelly>
And below code in client script :
function test() {
var entityName = $("entity_name").value;
alert(entityName);
}
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.