AddObjectArrayItem
CreateObject
InvokeConfigure
InvokeCreate
InvokeDelete
InvokeExecute
InvokeExtract
InvokePerform
InvokeRetrieve
InvokeSchedule
InvokeUpdate
SetObjectProperty
指定した API オブジェクトのプロパティの値を設定します。
SetObjectProperty(1, 2, 3)
| 序数 | 型 | 説明 | |
|---|---|---|---|
| 1 | string | 必須 | プロパティ値を設定する対象のオブジェクト |
| 2 | string | 必須 | プロパティ名 |
| 3 | string | 必須 | 新しいプロパティ値 |
1<script runat="server">
2 Platform.Function.SetObjectProperty("Subscriber","emailAdddress","jdoe@example.com");
3</script>このサンプルコードは、取得呼び出しを実行します。
1<script type="text/javascript">// <![CDATA[
2 // Note that you can perform retrieves only in context of a landing page or platform call
3
4 // Create an API Retrieve Request
5 var RetrieveRequest = Platform.Function.CreateObject("RetrieveRequest");
6
7 // Set the request type
8 Platform.Function.SetObjectProperty(RetrieveRequest, "ObjectType", "Email");
9
10 // Set the columns
11 Platform.Function.AddObjectArrayItem(RetrieveRequest, "Properties", "Email.Name");
12 Platform.Function.AddObjectArrayItem(RetrieveRequest, "Properties", "Email.ID");
13 Platform.Function.AddObjectArrayItem(RetrieveRequest, "Properties", "Email.Subject");
14 Platform.Function.AddObjectArrayItem(RetrieveRequest, "Properties", "Email.Status");
15 Platform.Function.AddObjectArrayItem(RetrieveRequest, "Properties", "Email.CharacterSet");
16 Platform.Function.AddObjectArrayItem(RetrieveRequest, "Properties", "Email.ContentCheckStatus");
17
18 // Create a filter
19 var RetrieveFilter = Platform.Function.CreateObject("SimpleFilterPart");
20 // By email id
21 // Platform.Function.SetObjectProperty(RetrieveFilter, "Property", "ID");
22 // Platform.Function.SetObjectProperty(RetrieveFilter, "SimpleOperator", "equals");
23 // Platform.Function.AddObjectArrayItem(RetrieveFilter, "Value", "5709");
24 // By client id
25 Platform.Function.SetObjectProperty(RetrieveFilter, "Property", "Client.ID");
26 Platform.Function.SetObjectProperty(RetrieveFilter, "SimpleOperator", "equals");
27 Platform.Function.AddObjectArrayItem(RetrieveFilter, "Value", "1191");
28
29
30 // Add the filter to the retrieve
31 Platform.Function.SetObjectProperty(RetrieveRequest, "Filter", RetrieveFilter);
32
33 // Do the retrieve
34 var StatusAndRequestID = [0,0];
35
36 var Emails = Platform.Function.InvokeRetrieve(RetrieveRequest, StatusAndRequestID);
37
38 // Check staus
39 Platform.Response.Write("Status: " + StatusAndRequestID[0]);
40 Platform.Response.Write("RequestID: " + StatusAndRequestID[1]);
41
42 for ( var c = 0 ; c < Emails.length ; c ++ )
43 {
44 Platform.Response.Write(Emails[c].ID);
45 Platform.Response.Write(" - ");
46 Platform.Response.Write(Emails[c].Name);
47 Platform.Response.Write("\r\n");
48 }
49// ]]>
50</script>