Client Script - Why GlideAjax(with getXMLAnswer) ?
The table is a good visualization of Simplicity versus Efficiency. API Simplicity Efficiency Description GlideRecord getReference 1st 5th - 1 line of code - Poor UX (blocks browser) - Returns entire record GlideRecord 2nd 4rd - ~ 5 lines of code - Poor UX (blocks browser) - Returns entire record GlideRecord getReference (with callback) 3rd 3rd - 5-10 lines of code (with callback) - Best UX (does not block browser) - Returns entire record GlideRecord (with callback) 4th 2nd - ~ 10 lines of code (with callback) - Best UX (does not block browser) - Returns entire record GlideAjax 5th 1st - ~20 lines of code (Client Script + Script Include) - Best UX (does not block browser) - Returns only the data you need Note: Actually I would change "GlideAjax" into "GlideAjax (with getXMLAnswer)". GlideAjax with getXML still would return a whole document. While GlideAjax with getXMLAnswer would only return the exact answer you need. Read about this in one of my previous articles G...