1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  StaticMethod Create ( 
 |    Unit owner, 
 |    DateTime earlieststart, 
 |    Number sequencenumberforexcel, 
 |    Real minqty, 
 |    Real maxqty, 
 |    Duration minduration, 
 |    Duration maxduration, 
 |    String campaigntypename, 
 |    String campaignid, 
 |    String comment, 
 |    Boolean hasinputmaxquantity, 
 |    Boolean hasinputmaxduration, 
 |    Boolean isfromdb 
 |  ) as Campaign_MP 
 |  { 
 |    Description: 'Create Campaign with derived duration.' 
 |    TextBody: 
 |    [* 
 |      duration := Campaign_MP::GetDerivedDuration( CampaignType_MP::FindCampaignTypeTypeIndex( campaigntypename, owner.ID() ), 
 |                                                   minqty, 
 |                                                   maxqty, 
 |                                                   hasinputmaxquantity, 
 |                                                   minduration, 
 |                                                   maxduration, 
 |                                                   hasinputmaxduration ); 
 |      campaign := Campaign_MP::Create( owner, 
 |                                       earlieststart, 
 |                                       duration, 
 |                                       sequencenumberforexcel, 
 |                                       minqty, 
 |                                       maxqty, 
 |                                       minduration, 
 |                                       maxduration, 
 |                                       campaigntypename,  
 |                                       campaignid, 
 |                                       comment, 
 |                                       hasinputmaxquantity, 
 |                                       hasinputmaxduration, 
 |                                       isfromdb ); 
 |      return campaign; 
 |    *] 
 |  } 
 |  
  |