Hi Team,
We have migrated our business code from v8 to v11.
After migration, we have got below error. SaveAttributes method is giving an error:
Argument 1: cannotconvert from’System.ColIections.GenericDictionary<Cmf.Navigo.BusinessObjectsAbstractions.lMaterial,
Cmf.Foundation.BusinessObjects.Abstractions.lAttributeCollection>to Cmf.Foundation,3usinessObjectsAbstractions.lAttributeCollection
Could you please help. your help would be appreciated.
Thanks,
Sandip Dhakane
In v11, MaterialCollection.SaveAttributes(Dictionary<IMaterial, IAttributeCollection>) does not exist anymore
Old code v8:
if (saveAttributes != null && saveAttributes.Count > 0)
{
MaterialCollection.SaveAttributes(saveAttributes);
}
v11 Compatible code:
if (saveAttributes != null && saveAttributes.Count > 0)
{
foreach (var item in saveAttributes)
{
IMaterial material = item.Key;
IAttributeCollection attributes = item.Value;
material.SaveAttributes(attributes);
}
}
Thanks,
Sandip D
Hi,
please take a look at Migration Tool 9.0.0 - Critical Manufacturing Developer Portal where we have a tool to migrate your backend code