public static final map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();

 

private static map<String, DescribeSObjectResult> map_describeSobject_objName = new map<String, DescribeSObjectResult>();

 

 

public static DescribeSObjectResult describeSobj (String objApi) {
	        DescribeSObjectResult sobjr;
	            
	        if (map_describeSobject_objName.containsKey(objApi)) {
	            sobjr = map_describeSobject_objName.get(objApi);
	        }
	        else {
	            sobjr = gd.get(objApi).getDescribe();
	            map_describeSobject_objName.put(objApi, sobjr);
	        }
	        
	        return sobjr;
	    }

 

相关文章:

  • 2022-01-16
  • 2021-09-21
  • 2021-12-04
  • 2022-12-23
  • 2022-01-19
猜你喜欢
  • 2021-11-24
  • 2021-10-11
  • 2022-01-11
  • 2022-01-03
  • 2021-07-05
相关资源
相似解决方案