nl_tokens: Create the objects in the array in the database and call success ( ... ) or err ( ... ) on success / failure
pl_tokens: function ( objAry , success , err ) { var result = [ ] ; for ( var i = 0 ; i < objAry . length ; i ++ ) { var obj = objAry [ i ] ; try { sforce . db . validateSobject ( obj ) ; obj = _extend ( { } , obj ) ; var objs = sforce . db . getSobjects ( obj . type ) ; obj . Id = ( ( ! sforce . db . useGivenIds || typeof obj . Id === 'undefined' ) ? sforce . db . newId ( ) : obj . Id ) ; objs [ obj . Id ] = obj ; result . push ( { success : 'true' , id : obj . Id } ) ; } catch ( e ) { <mask> . push ( { success : 'false' , id : obj . Id } ) ; } } if ( success ) success ( result ) ; return result ; }