param { string } entity param { string } objectGuid returns { Promise . < MxObject > } export async function GetObjectByGuid ( entity , objectGuid ) { if ( ! entity ) { return Promise . reject ( new Error ( "Input parameter 'Entity' is required." ) ) ; } if ( ! objectGuid ) { return Promise . reject ( new Error ( "Input parameter 'Object guid' is required." ) ) ; } return new Promise ( ( resolve , reject ) => { mx . data . get ( { guid : objectGuid , callback : object => { if ( object ) { resolve ( object ) ; } else { reject ( new Error ( "'Object guid' not found" ) ) ; } } } ) ; } ) ; }