| | |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 办事处 recodetype'); |
| | | } |
| | | List<RecordType> rectCo1 = [select Id from RecordType where IsActive = true and SobjectType = 'Sample_order_list_detail__c' and Name = '盘点']; |
| | | if (rectCo.size() == 0) { |
| | | throw new ControllerUtil.myException('not found 盘点 recodetype'); |
| | | } |
| | | // 客户 |
| | | Account account2 = new Account(); |
| | | account2.Name = 'test1经销商'; |
| | | account2.RecordTypeId = '01210000000Qem1'; |
| | | insert account2; |
| | | Account Agency = new Account(); |
| | | Agency.RecordTypeId = rectCo[0].Id; |
| | | Agency.Name = 'Katsu テスト'; |
| | | Agency.Quolified_Approve_Status__c = 'Draft'; |
| | | Agency.If_Need_Quolified__c = true; |
| | | Agency.ParentId = account2.Id; |
| | | insert Agency; |
| | | // 产品 |
| | | Product2 product = new Product2(); |
| | |
| | | samOrderDetail.Standards__c = 1; |
| | | samOrderDetail.ItemQuantity__c = 1; |
| | | samOrderDetail.Inventory_Check__c = 10; |
| | | samOrderDetail.RecordTypeId = '0121m000000xWyw'; |
| | | samOrderDetail.RecordTypeId = rectCo1[0].Id; |
| | | samOrderDetail.Inventory_Header__c = IHN.Id; |
| | | insert samOrderDetail; |
| | | |