Hi,
I'm creating FunctionResources by code.
On the system, the resource name is filled in with the value I want, for example "My Coffee Machine"
However the functionDVE name is using the Id. for example: "Kitchen.1" "Kitchen" being my Element name that has the function for which I'm making resources.
So how do I get "Kitchen.My Coffee Machine" as functionDVE name?
Here is a snippet of the code I use:
FunctionResource functionResource = new FunctionResource(protocol.DataMinerID, protocol.ElementID)
{
Name = Convert.ToString(row.Profileinstancesname_202),
PoolGUIDs = new List<Guid> { resourcePoolGuid },
FunctionGUID = functionDefinitionGuid,
LinkerTableEntries = new[] { linkerTableEntry },
MaxConcurrency = maxConcurrency,
};
This function resource will eventually get stored via the SrmManagers.ResourceManager.AddOrUpdateResources method.
Hi Mieke,
This can be achieved by setting the FunctionName in your constructor.
e.g.
FunctionResource functionResource = new FunctionResource()
{
Name = Convert.ToString(row.Profileinstancesname_202),
PoolGUIDs = new List<Guid> { resourcePoolGuid },
FunctionGUID = functionDefinitionGuid,
LinkerTableEntries = new[] { linkerTableEntry },
MaxConcurrency = maxConcurrency,
FunctionName = "My Coffee Machine"
};