Bookshelf Home | Contents | Index | PDF |
Oracle CRM On Demand JavaScript API Developer's Guide > JavaScript API Code Samples > Code Sample for a Custom Button That Updates a RecordThe following code sample illustrates the use of the updateRecord() method to update an Account record when a button created with the createButton() method and labeled if(oraclecrmod.ctx.isObject("Account") && oraclecrmod.ctx.isDetailPage()) var callback = function(request,response) data += "Id = " + response.getRowId() + ", Mod Id = " + response.getModId(); alert(data + "\n" + status + "\n" + error); oraclecrmod.dataSvc.updateRecord("Account", {Name : "Account Name Update123"}, "AUDA-1HSXSB", callback); var tb = oraclecrmod.getTitleBar("AccountFormTB"); var bt = oraclecrmod.createButton({id:"TestUpdateBtn",text:"Test Update",parent:tb}); |
Oracle CRM On Demand JavaScript API Developer's Guide, Release 36 | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |