AuthoringMetadata

  • Updated

Metadata attached to elements in the rule application at authoring time.

getAttributeValue(attrib uteName, groupName) Returns: string

Parameters:

attributeName

Type: string

Name of the attribute value to return

 

groupName

Type: string

Optional attribute group name

Description:

Returns the value specified by the attribute name from the attribute group. If groupName is null, the default attribute group is used.

Code Sample:

var session = inrule.createRuleSession();
var entity1 = session.createEntity("Entity1");
var crmEntityName = entity1.metadata.getAttributeValue("CRMEntity",
"InRule\u00AE for Microsoft Dynamics\u00AE CRM");

 

getAttributes(groupNam e) Returns: object

name

Type: string

The name of the Inline Table to return

Description:

Returns all attributes in the specified group name. If groupName is null, the default attribute group is used.

Code Sample:

var session = inrule.createRuleSession();
var entity1 = session.createEntity("Entity1");
var attributes = entity1.metadata.getAttributeValue("InRule\u00AE for 
Microsoft Dynamics\u00AE CRM"); var crmEntityName = attributes.CRMEntity;

 

displayName Returns: string

Description:

Returns the element's display name

Code Sample:

var session = inrule.createRuleSession();
var entity1 = session.createEntity("Entity1"); 
var displayName = entity1.metadata.displayName;

 

dataType Returns: string

Description:

Returns the element's data type

Code Sample:

var session = inrule.createRuleSession();
var entity1 = session.createEntity("Entity1"); 
var dataType = entity1.metadata.dataType;

 

defaultValue Returns: string

Description:

Returns a value if the element has an authored default value otherwise null

Code Sample:

var session = inrule.createRuleSession();
var entity1 = session.createEntity("Entity1"); 
var defaultValue = entity1.metadata.defaultValue;

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.