- Revenera Community
- :
- FlexNet Operations
- :
- FlexNet Operations Forum
- :
- Overwrite Line Item Information especially permanent / Expired Date C#
- 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
Overwrite Line Item Information especially permanent / Expired Date C#
Hi Sir/Madam,
I tried to update my existing Line Item which already have existing Activation Id as below:-
using (var eos = new EntitlementOrderClient())
{
eos.Open(ConfigurationManager.AppSettings["FNOODUN"], ConfigurationManager.AppSettings["FNOODpassword"], ConfigurationManager.AppSettings["FNOCBaseURL"]);
createSimpleEntitlementDataType[] seArray = new createSimpleEntitlementDataType[1];
addEntitlementLineItemDataType[] lineDT = new addEntitlementLineItemDataType[1];
var lineItems = new createEntitlementLineItemDataType[1];
var keyss = dataAccess.GetKeysQuery().Where(a => a.Id.Equals(key.Id)).FirstOrDefault();
lineItems[0] = new createEntitlementLineItemDataType
{
activationId = new idType
{
autoGenerate = false,
id = key.SerialNumber
},
partNumber = new Flexnet.Entitlement.partNumberIdentifierType
{
primaryKeys = new Flexnet.Entitlement.partNumberPKType
{
partId = LicDet[0].ProductCode,
},
},
licenseModel = new Flexnet.Entitlement.licenseModelIdentifierType
{
primaryKeys = new Flexnet.Entitlement.licenseModelPKType
{
name = LicDet[0].Description,
}
},
lineItemAttributes = new[]
{
new Flexnet.Entitlement.attributeDescriptorType()
{
attributeName = "EndUserID",
stringValue = key.Site.SiteNumber.ToString()
},
new Flexnet.Entitlement.attributeDescriptorType()
{
attributeName = "EndUserName",
stringValue = key.Site.Name.ToString()
},
new Flexnet.Entitlement.attributeDescriptorType()
{
attributeName = "OrderLineNo",
stringValue = "OO DAX "+key.OrderNumber,
},
new Flexnet.Entitlement.attributeDescriptorType()
{
attributeName = "SerialNumber",
stringValue = key.SerialNumber + "("+ key.OrderNumber +")"
},
new Flexnet.Entitlement.attributeDescriptorType()
{
attributeName = "SiteID",
stringValue = key.Site.SiteNumber.ToString()
},
},
orderId = LicDet[0].ProductCode,
orderLineNumber = "OO DAX " + key.OrderNumber, //get from SAP Order #
numberOfCopies = LicDet[0].Quantity.ToString(),
startDateOption = StartDateOptionType.DEFINE_ACTDATE_AT_FIRST_ACTIVATION,
startDateSpecified = false,
isPermanent = false,
isPermanentSpecified = false,
expirationDateSpecified = true,
expirationDate = DateTime.Parse(model.TimeLimitedEndDate.Value.ToString("yyyy-MM-dd"))
};
lineDT[0] = new addEntitlementLineItemDataType
{
entitlementIdentifier = new entitlementIdentifierType
{
primaryKeys = new entitlementPKType
{
entitlementId = "SOC-" + key.Site.SiteNumber + "-" + key.OrderNumber,
}
},
lineItems = lineItems,
autoDeploy = true,
autoDeploySpecified = true
};
addOrReplaceEntitlementLineItemResponseType csertAddLnItem2ExistingEntitlement = eos.CreateEntitlementLineItem(lineDT);
The error showing for csertAddLnItem2ExistingEntitlement.failedData[0].reason
"7060:Duplicate Activation ID xxxx-GTFX-1604-xxxx. [Incident# 5601-924129799]"
It was weird, the function saying addOrReplaceEntitlementLineItemResponseType !???
May I know where can I get the sample of C# code for Revenera related to entilement & entitlement line items?
Please advise.
Regards,
Micheale
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)