diff --git a/RemoteTK.component b/RemoteTK.component index cb06fb7..c53d2ec 100644 --- a/RemoteTK.component +++ b/RemoteTK.component @@ -57,6 +57,12 @@ if (remotetk.Client === undefined) { */ remotetk.Client = function(){ } + + /** NOOP: for compatibility with forcetk + */ + remotetk.Client.prototype.setSessionToken = function() {} + remotetk.Client.prototype.setRefreshToken = function() {} + remotetk.Client.prototype.setUserAgentString = function() {} /* * Completely describes the individual metadata at all levels for the diff --git a/RemoteTKController.cls b/RemoteTKController.cls index 2ae97b3..78e4e80 100644 --- a/RemoteTKController.cls +++ b/RemoteTKController.cls @@ -45,6 +45,13 @@ public class RemoteTKController { field.put('type', descField.getType().name().toLowerCase()); field.put('name', descField.getName()); field.put('label', descField.getLabel()); + List references = new List(); + for (Schema.sObjectType t: descField.getReferenceTo()) { + references.add(t.getDescribe().getName()); + } + if (!references.isEmpty()) { + field.put('referenceTo', references); + } fields.add(field); } @@ -224,6 +231,8 @@ public class RemoteTKController { Map result = new Map(); result.put('records', records); + result.put('totalSize', records.size()); + result.put('done', true); return JSON.serialize(result); }