This function is used to get the record details based on the column name and value provided and it returns the data of the field names provided.
Function: GetDataByColumn(<Column Name>, (<Column Value>, <Object Name>, <Field Names>)Usage: var Task = GetDataByColumn(“Name”, “Annual Meeting – ABC 2016″,”Task”,”Id,Name,Start,End,Description,Location,Attendees,OwnerId”);Output:Success:The object can be used like this:
If the result returns only 1 record:Task.IdTask.NameIf the result returns more than 1 record:
var Events = GetDataByColumn(“Lead”, GetRecordGUID(), “Event”, “Id”);
if (Events != null) {
if (Events.length != undefined) {
for (var i = 0; i < Events.length; i++) {
Events[i].Id;
}
}
}
Failure:An error message will be displayed