- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2019 02:20 PM
I have a client script in which i need to use call callback function so that it will work on Portal . Can someone help
function onLoad() {
adjustVariables();
function adjustVariables(){
//variables to be hidden need to be not mandatory before setting display to false.
g_form.setMandatory("requester_information",false);
g_form.setDisplay("requester_information",false);
g_form.setReadOnly("csv_tenant_request", true);
// Set Current Values
var volume = g_form.getReference("csv_tenant_request", setCurrentValues);
g_form.setValue("csv_current_account_owner", volume.u_account_owner);
g_form.setReadOnly("csv_current_account_owner", true);
}
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2019 07:01 AM
below is callback function
you can't dot walk on client script direct so you have to use callback function.
var volume = g_form.getReference("csv_tenant_request", setCurrentValues);
// Set Current Values
var volume = g_form.getReference("csv_tenant_request", setCurrentValues);
function setCurrentValues(volume) {
g_form.setValue("csv_current_account_owner", volume.u_account_owner);
g_form.setReadOnly("csv_current_account_owner", true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2019 02:48 PM
try
function onLoad() {
adjustVariables();
function adjustVariables(){
//variables to be hidden need to be not mandatory before setting display to false.
g_form.setMandatory("requester_information", false);
g_form.setDisplay("requester_information", false);
g_form.setReadOnly("csv_tenant_request", true);
// Set Current Values
var volume = g_form.getReference("csv_tenant_request", setCurrentValues);
function setCurrentValues(volume) {
g_form.setValue("csv_current_account_owner", volume.u_account_owner);
g_form.setReadOnly("csv_current_account_owner", true);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2019 06:57 AM
Thanks Mike
Can you please tell me what exactly the call back will do ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2019 07:01 AM
below is callback function
you can't dot walk on client script direct so you have to use callback function.
var volume = g_form.getReference("csv_tenant_request", setCurrentValues);
// Set Current Values
var volume = g_form.getReference("csv_tenant_request", setCurrentValues);
function setCurrentValues(volume) {
g_form.setValue("csv_current_account_owner", volume.u_account_owner);
g_form.setReadOnly("csv_current_account_owner", true);
}
