You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.
It seems like the RowVersion field is not used when an entity is being added during the Initialize method.
For example:
I have created an entity in my test with a RowVersion = "123" field.
Used the context Initialize method and passed as a parameter the entity I have just created.
In my plugin I have a code that retrieves this entity and doing something with the RowVersion field.
Apparently, when you retrieve this entity, the RowVersion is always null.
It seems like that the method Clone(this Entity e, Type t, XrmFakedContext context = null) in EntityExtensions.cs does not populate the RowVersion field but only the Id and Logical Name.
Just wanted to know if it is a bug or is there another way to get this field?
this is the part where I think the RowVersion is missing.
var cloned = Activator.CreateInstance(t) as Entity;
cloned.Id = e.Id;
cloned.LogicalName = e.LogicalName;
The text was updated successfully, but these errors were encountered:
Thanks for spotting this. There was no appetite in the community for a RowVersion property up until now apparently :D so yeah, the RowVersion cloning hasn't been there yet. I'll add it to the backlog.
It seems like the RowVersion field is not used when an entity is being added during the Initialize method.
For example:
I have created an entity in my test with a RowVersion = "123" field.
Used the context Initialize method and passed as a parameter the entity I have just created.
In my plugin I have a code that retrieves this entity and doing something with the RowVersion field.
Apparently, when you retrieve this entity, the RowVersion is always null.
It seems like that the method Clone(this Entity e, Type t, XrmFakedContext context = null) in EntityExtensions.cs does not populate the RowVersion field but only the Id and Logical Name.
Just wanted to know if it is a bug or is there another way to get this field?
this is the part where I think the RowVersion is missing.
var cloned = Activator.CreateInstance(t) as Entity;
cloned.Id = e.Id;
cloned.LogicalName = e.LogicalName;
The text was updated successfully, but these errors were encountered: