- Revenera Community
- :
- FlexNet Operations
- :
- FlexNet Operations Forum
- :
- searchActivatableItem Custom Attribute with attribute name and value
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
searchActivatableItem Custom Attribute with attribute name and value
Hi All,
I want to searchActivatableItem Custom Attribute with attribute name and value. My code as below, something wrong on the portion of highlighted code below. Can anyone help me on this?
searchActivatableItemDataType searchtype = new searchActivatableItemDataType();
Flexnet.Entitlement_Serv.SimpleQueryType qtype = new Flexnet.Entitlement_Serv.SimpleQueryType();
qtype.searchType = Flexnet.Entitlement_Serv.simpleSearchType.CONTAINS;
qtype.value = reader.GetString(0);
searchtype.entitlementId = qtype;
Flexnet.Entitlement_Serv.SimpleQueryType qtype2 = new Flexnet.Entitlement_Serv.SimpleQueryType();
qtype2.searchType = Flexnet.Entitlement_Serv.simpleSearchType.CONTAINS;
qtype2.value = reader.GetString(1);
searchtype.customAttributes.attributes.lineItemCustomAttributeQueryType.attributeName = "SerialNumber";
searchtype.customAttributes.attributes.lineItemCustomAttributeQueryType.stringValue = qtype2;
Please advise.
Thanks.
Regards,
Micheale
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
I manage to modified to this:-
searchActivatableItemDataType searchtype2 = new searchActivatableItemDataType();
Flexnet.Entitlement_Serv.SimpleQueryType qtype2 = new Flexnet.Entitlement_Serv.SimpleQueryType();
qtype2.searchType = Flexnet.Entitlement_Serv.simpleSearchType.CONTAINS;
qtype2.value = reader.GetString(0);
searchtype2.entitlementId = qtype2;
searchtype2.lineItemAttributes = new lineItemCustomAttributeQueryType[]
{
new lineItemCustomAttributeQueryType {
attributeName = "SerialNumber",
stringValue = new Flexnet.Entitlement_Serv.SimpleQueryType() {
searchType = Flexnet.Entitlement_Serv.simpleSearchType.CONTAINS,
value = reader.GetString(1)
}
}
};
Below is the print screen from Report which I able to get the custom attribute for SerialNumber under field name: Entitlement Line Custom Attribute 3 Name; Value: Entitlement Line Custom Attribute 3 Value
Working Perfectly now.
Issued Closed.
Thanks
Regards,
Micheale