63、saleforce DML
PRIVELEGE__c privilege = new PRIVELEGE__c(PRIVILAGENAME__c = '权限添加',PRIVILAGEDESCRIBE__c = '权限描述'); ROLE__c role = new ROLE__c(ROLENAME__c = '角色添加',ROLEDESCRIBE__c = '角色描述'); insert privilege; insert role; ID roleId = [select Id from ROLE__c limit 1][0].ID; ID privelegeId = [select Id from PRIVELEGE__c limit 1][0].ID; PRIVILAGEROLE__c privelegeRole = new PRIVILAGEROLE__c(); privelegeRole.ROLEID__c = roleId; privelegeRole.PRIVELEGEID__c = privelegeId; insert privelegeRole;
执行结果如下所示: