Unable to create consumable

prasanna11
Mega Guru

When I attempt to create a consumable from the list view I see the below error that is from the expense line creations and I see that expense line is created (without source table) but the consumable is not.

Exception (org.mozilla.javascript.JavaScriptException: org.mozilla.javascript.EvaluatorException: GlideRecord.get() - invalid table name: null (sys_script_include.ce9717862c75f010f8776788a1c28a2b.script; line 19)) occured while evaluating'Condition: new ProjectUnAccountedExpensesHandler(current).isProjectOrphanExpense();; Filter Condition: cost_planISEMPTY^EQ' in business rule 'DefaultMiscCostPlanOnUnAccExp' on fm_expense_line: EXP0072742; skipping business rule

 

When I execute the script below to do create via background script I see that the record seems to be inserted but I do not see it. I compared the consumable model category that I have with OOTB, there is no difference. And there is no ACL that is on this table preventing me from seeing it.

var cons = new GlideRecord('alm_consumable');
cons.initialize();
cons.setValue('model_category','218323293743100044e0bfc8bcbe5d61');
cons.setValue('model','7073d3a51b87f090a0c38553604bcb2b');
cons.insert();

 

Output:

Consumable from bg.png

 

prasanna11_0-1711021077572.png

 

What is happening.! Any help would be appreciated.

0 REPLIES 0