小编Anu*_*Anu的帖子

FIELD_CUSTOM_VALIDATION_EXCEPTION

我正在为触发器编写测试类.但我无法正常运行它只包含68%.错误是

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, This part is not forecastable. 

@isTest
private class TestTriggers
{
   static testMethod void testService()
   {        
   //Insert part    
    list<Opportunity> Opportunity = new list<Opportunity>();
    Opportunity = [Select id from Opportunity];
    list<Product2> Product = new list<Product2>();
    Product = [Select id from Product2];
    Part__c p = new Part__c(Stage__c = 'idea',Product__c=Product[0].id,Opportunity__c=Opportunity[0].id);
    insert p;

   //Update part
    list<part__c> partlist = new list<part__c>();
    partlist =  [Select Stage__c from part__c where Stage__c = 'idea'];
    partlist[0].Stage__c = 'update'; …
Run Code Online (Sandbox Code Playgroud)

salesforce apex

3
推荐指数
1
解决办法
2万
查看次数

与JasperReports的MS SQL Server连接

请告诉我如何设置与MS SQL Server 2005和JasperReports的连接.

请告诉我连接的步骤.

sql-server sql-server-2005 jasper-reports ireport

1
推荐指数
1
解决办法
8341
查看次数