Hi All,
Please find the Javascript to get Account Type Code.
function onload() {
var getAccountCode =
getobjecttypecode("account");
alert(getAccountCode);
}
function getobjecttypecode(entityName) {
try {
var lookupService = new RemoteCommand("LookupService", "RetrieveTypeCode");
lookupService.SetParameter("entityName", entityName);
var result =
lookupService.Execute();
if (result.Success && typeof result.ReturnValue == "number") {
return result.ReturnValue;
}
else {
return null;
}
}
catch (ex) {
throw ex;
}
}
No comments:
Post a Comment