• 検索結果がありません。

Publisher Quick Actions

ドキュメント内 Salesforce1 アプリケーション開発者ガイド (ページ 162-167)

成功です。これで、作成したアクションを

REST API

コールで呼び出すように

Shipify

Web

アプリケーションを更新できました。

このリソースへのコールでは、次の応答のスニペットに示すように、

Shipify

キャンバスカスタムアクションを含む、グローバルアクションに関する情報が 返されます。

...

{

"urls" : {

"quickAction" : "/services/data/v31.0/

quickActions/LogACall",

"defaultValues" : "/services/data/v31.0/

quickActions/LogACall/defaultValues",

"describe" : "/services/data/v31.0/

quickActions/LogACall/describe"

},

"name" : "LogACall",

"type" : "LogACall",

"label" : "Log a Call"

}, {

"urls" : {

"quickAction" : "/services/data/v31.0/

quickActions/Shipify",

"describe" : "/services/data/v31.0/

quickActions/Shipify/describe"

},

"name" : "Shipify",

"type" : "Canvas",

"label" : "Shipify"

}, ...

オブジェクトアクション

グローバルアクションだけでなく特定のオブジェクトのアクションを返すに は、services/data/v31.0/sobjects/object/quickActions/を使用しま す。

/services/data/v31.0/sobjects/Invoice__c/quickActionsコールでは、

次の応答のスニペットに示すように、グローバルアクションおよび請求書の

Create_Deliveryアクションに関する情報が返されます。

...

{ "urls" : {

"quickAction" : "/services/data/v31.0/

quickActions/Shipify",

"describe" : "/services/data/v31.0/

quickActions/Shipify3/describe"

},

"name" : "Shipify",

"type" : "Canvas",

"label" : "Shipify3"

{

"urls" : {

"defaultValuesTemplate" : "/services/data/v31.0/

sobjects/Invoice__c/quickActions/Create_Delivery/

defaultValues/{ID}",

"quickAction" : "/services/data/v31.0/

sobjects/Invoice__c/quickActions/Create_Delivery",

"defaultValues" : "/services/data/v31.0/

sobjects/Invoice__c/quickActions/Create_Delivery/

defaultValues",

"describe" : "/services/data/v31.0/

sobjects/Invoice__c/quickActions/Create_Delivery/

describe"

},

"name" : "Invoice__c.Create_Delivery",

"type" : "Create",

"label" : "Create Delivery"

}, ...

特定のアクション

特定のアクションを返すには、

services/data/v31.0/sobjects/object/quickActions/{アクション名} を使用します。

/services/data/v31.0/sobjects/Invoice__c/

quickActions/Create_Deliveryコールでは、次の応答に示すように、

Create_Deliveryアクションに関する情報のみが返されます。

{

"colors": [ {

"theme": "theme4",

"color": "AA8E0A",

"context": "primary"

}, {

"theme": "theme3",

"color": "AA8E0A",

"context": "primary"

} ],

"miniIconUrl": "https://instance.salesforce.com/img/

icon/custom51_100/truck16.png",

"sourceSobjectType": "Invoice__c",

"targetParentField": "Invoice__c",

"targetRecordTypeId": null,

"targetSobjectType": "Delivery__c",

"visualforcePageName": null,

"iconUrl": "https://instance.salesforce.com/img/

icon/custom51_100/truck32.png",

"iconName": null,

"canvasApplicationName": null,

"height": null,

"icons": [ {

"url": "https://instance.salesforce.com/img/

icon/custom51_100/truck32.png",

"height": 32,

"theme": "theme3",

"width": 32,

"contentType": "image/png"

}, {

"url": "https://instance.salesforce.com/img/

icon/custom51_100/truck16.png",

"height": 16,

"theme": "theme3",

"width": 16,

"contentType": "image/png"

}, ...

],

"layout": {

"layoutRows": [{

"layoutItems": [ {

"layoutComponents": [{

"details": {

"namePointing": false,

"custom": true,

"htmlFormatted": false,

"dependentPicklist": false,

"calculatedFormula": null,

"defaultValueFormula": null,

"defaultedOnCreate": false,

"digits": 0,

"groupable": true,

"permissionable": false,

"referenceTo": ["Invoice__c"],

"relationshipOrder": 0,

"soapType": "tns:ID",

"nameField": false,

"sortable": true,

"filterable": true,

"restrictedPicklist": false,

"caseSensitive": false,

"calculated": false,

"scale": 0,

"nillable": false,

"externalId": false,

"idLookup": false,

"controllerName": null,

"deprecatedAndHidden": false,

"inlineHelpText": null,

"createable": true,

"updateable": false,

"relationshipName": "Invoice__r",

"autoNumber": false,

"unique": false,

"picklistValues": [],

"displayLocationInDecimal": false,

"cascadeDelete": true,

"restrictedDelete": false,

"length": 18,

"name": "Invoice__c",

"type": "reference",

"defaultValue": null,

"byteLength": 18,

"label": "Invoice",

"precision": 0 },

"displayLines": 1,

"tabOrder": 1,

"value": "Invoice__c",

"type": "Field"

}],

"placeholder": false,

"editable": true,

"required": true,

"label": "Invoice"

}, {

"layoutComponents": [],

"placeholder": true,

"editable": false,

"required": false,

"label": ""

} ],

"numItems": 2 }],

"useCollapsibleSection": false,

"useHeading": false,

"columns": 2,

"heading": null,

"rows": 1 },

"defaultValues": [],

"width": null,

"urls": {

"defaultValuesTemplate": "/services/data/v31.0/

sobjects/Invoice__c/quickActions/

Create_Delivery/defaultValues/{ID}",

"quickAction": "/services/data/v31.0/

sobjects/Invoice__c/quickActions/Create_Delivery",

"defaultValues": "/services/data/v31.0/

sobjects/Invoice__c/quickActions/

Create_Delivery/defaultValues",

"describe": "/services/data/v31.0/

sobjects/Invoice__c/quickActions/

Create_Delivery/describe"

},

"name": "Invoice__c.Create_Delivery",

"type": "Create",

"label": "Create Delivery"

}

アクションの詳細

特定のアクションの説明の詳細を返すには、

services/data/v31.0/sobjects/object/quickActions/{アクション }/describe/を使用します。

アクションのデフォルト値と項目値

デフォルトの項目値を含む、特定のアクションのデフォルト値を返すには、

services/data/v31.0/sobjects/object/quickActions/{アクション }/defaultValues/を使用します。

/services/data/v31.0/sobjects/Invoice__c/

quickActions/Create_Data/defaultValuesコールでは、次の応答のスニ ペットに示すように、請求書のCreate_Deliveryアクションのデフォルトに 関する情報が返されます。

...

{

"attributes":{

"type":"Delivery__c"

} } ...

アクションのデフォルト値

アクションのデフォルト値を返すには、/services/data/v31.0/subjects/

オブジェクト/quickActions/{アクション名}/defaultValues/{親 ID}を使用 します。

ドキュメント内 Salesforce1 アプリケーション開発者ガイド (ページ 162-167)