Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Record.load not work when you do currentRecord.get ?
Hello,
In my client script, when i do record load alone it's working fine same with rec.setValue and rec.save.
But when i put a currentRecord.get before all of my code, my record.load it's impossible why ?
Because when i put scriptContext.currentRecord; in other script it's working fine :(.
function calculBudget() {
var record = currentRecord.get();
var projectId = record.id;
log.debug("project", projectId);
log.debug("calculBudget", "appel via le button");
var rec = record.load({
type : 'customrecord_projet_budget_reel',
id : 2,
isDynamic : true,
});
log.debug("calculBudget", "record load");
rec.setValue({
fieldId : 'custrecord_budget_reel_frais_pers',
value : 15,
ignoreFieldChange : false