script include return value is not updating the variable field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-01-2018 07:09 AM
I've managed to fixed the issue I used to have for the variable name in the passed parameter.. Now it is passing back the correct value back to the catalog client script.
But, the contract variable field is not displaying the returned value.
The g_form.setValue('contract', answer); is not working. Why is that so? I cannot find any concern in here honestly.
By the way, by default the M2M display value is set to sys_created_on, so I updated the table to make contract field display=true. This is because I want to give the user the easy reference to the contract field value rather than the created date. Is this what's causing the setting of value on the variable? Do I need to do anything on the variable type specifications? I even changes the reference table of contract variable both to the ast_contract and clm_m2m_contract_asset but still not working as expected.
I hope anyone can see what I am missing.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-01-2018 07:40 AM
Nomadie,
This happens sometimes because of load time. I believe you when you are saying that you are getting the right value from the Script include in the answer.
I would recommend just a small thing i.e. put your complete client script inside a timeout function. That will make you get over the load time problem.
example:
function onLoad() {
//Type appropriate comment here, and begin script below
//recommend using a try and catch. Better debugging.
setTimeout(function(){
try{
// add the complete code into this.
}
catch(e){
alert(e.toString());//post debugging of errors, comment it.
}
},3000);
}
Let me know how it goes. Good Luck!!
Mark this as Correct and Helpful if it was.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-01-2018 07:42 AM
Second,
"By the way, by default the M2M display value is set to sys_created_on, so I updated the table to make contract field display=true. This is because I want to give the user the easy reference to the contract field value rather than the created date. Is this what's causing the setting of value on the variable? Do I need to do anything on the variable type specifications? I even changes the reference table of contract variable both to the ast_contract and clm_m2m_contract_asset but still not working as expected."
For this, I may be wrong but I don't think it should be a problem. The record sys_id should be returned whatsoever is the display which should set the value.
Mark this as Correct and Helpful if it was.