function getObjectTypeCodeByName(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 (e) { alert("Error while getting ETC by Name." + e.description); } }
时间: 2024-11-08 01:24:12