rally - Creating an object in SDK2 -
how create new object (like defect) using sdk2?
this must obvious , i'm missing it-- i've been using sdk2 while has sever come up. under data part of sdk hierarchy?
you can through instance of object's model, similar following:
rally.data.modelfactory.getmodel({ type: "defect", success: function (defectmodel) { var newdefect = ext.create(defectmodel, { name : "my new defect sdk2", priority : "normal", severity : "minor problem", description : "improper display of...", state : "submitted" // other relevant/required fields }); newdefect.save({ callback: function(result, operation) { if(operation.wassuccessful()) { //get new defect's objectid var objectid = result.get('objectid'); } } }); } });
the following page docs shows full create/read/update/delete cycle appsdk2:
https://developer.help.rallydev.com/apps/2.0p5/doc/#!/guide/appsdk_20_data_models
Comments
Post a Comment