The getIntentionReference() method gets a reference to the intention specified by the specified intentionName , as constrained by the optional secondArgKey .
intention = getIntentionReference( intentionName , secondArgKey )
|
intentionName |
String |
Name of the intention to get. |
|
secondArgKey |
String |
(Optional) Secondary key, which must be present as an argument of intentionName for the reference to be retrieved. |
|
Object |
Reference to the specified intention. |
var context = this.getContext();var search = context.get('search');
var fieldsIntention = search.getIntentionReference('setfields');
if (fieldsIntention) {
alert('setfields exists');
} else {
alert('setfields does not exist');
}