public without sharing class ConsumableAccountInfoController { // 客户ID public String accId { get; set; } // 客户信息 public Account obj { get; set; } public ConsumableAccountInfoController() { accId = ApexPages.currentPage().getParameters().get('AccId'); } // 画面初期化 public void init() { if (accId != null) { List accList = [select Id, Name, Owner.Name, Site, Alias_Name2__c, Grade__c, OCM_Category__c, Is_Active__c, Ban_On_Use_Reason__c, Attribute_Type__c, Speciality_Type__c, State_Master__r.Name, City_Master__r.Name, Town__c, Street__c, Address_Together__c, Phone, PhoneCall__c, Fax, Postal_Code__c, Parent.Name, Address__c from Account where Id =: accId]; if (accList != null && accList.size() > 0) { obj = accList.get(0); } } } }