Am I missing something when adding a script to an ...
# suitescript
d
Am I missing something when adding a script to an address form? I've stripped this down completely and it still doesn't work. When I click Save on the address form, it just sits there. I see my console.log output, but the form never submits. If I click save again, it says that I've already submitted the form.
Copy code
...
    function saveRecord(scriptContext) {
        console.log('----about to return TRUE');
        return true;
    }
    return {
        saveRecord: saveRecord
    };
...
d
I was really hoping that removing the N/currentRecord module would do the trick, but still not having any success. I even copied the exact code from that article:
Copy code
/**
 * @NApiVersion 2.x
 * @NScriptType ClientScript
 * @NModuleScope SameAccount
 */
define([],function(){
    function saveRecord(context){
        console.log('--- ABOUT TO RETURN TRUE');
        return true;
    }
    return {
        saveRecord: saveRecord
    }
});
b
you missed the first block of code
address client script runs serverside
👍 1
where there isnt a console
d
Ahhh. Brilliant. Thank you so much. Eliminating the console.log resolved the issue. I appreciate your time/help with this!