Extensions

The Kipon Solid platform is offering som convinient extensions related to writing plugins. The section is documented by its namespace. To get the method mentioned here, add the "using [namespace]" in the top of your class code.

Kipon.Xrm.Extensions.Sdk

ToEarlyBoundEntity: public static T ToEarlyBoundEntity(this T ent) where T : Microsoft.Xrm.Sdk.Entity

Converts an instance of Microsoft.Xrm.Sdk.Entity to its corresponding strongly typed entity. This method only works for entities that has been setup in filter.xml, - hence it require that the early bound entity has been generated

TargetFilterAttributesOf: public static string[] TargetFilterAttributesOf(this T entity, Type interfaceType) where T : Microsoft.Xrm.Sdk.Entity

This method is used by the framework to find attributes in the interface [interfaceType] that should be added to filter when listening for update on the Entity of type entityType. This method is a framework method, and you proberbly do not need to use it directly in your code.

TargetFilterAttributesOf: public static string[] TargetFilterAttributesOf(this Type entityType, Type interfaceType)

Simple overload of above, that takes the type instead of the entity instance as entityType parameter

GetSafeValue: public static object GetSafeValue(this Microsoft.Xrm.Sdk.Entity entity, string attribLogicalName)

return the value in the entity payload that correspond to the logical name attribLogicalName, null if the payload does not contain the value. This method is redundant with standard sdk code. Avoid using it.

© Kipon ApS 2020, 2021, 2022, 2023. All content on the page is the property of Kipon ApS. Any republish or copy of this content is a violation. The content of this site is NOT open source, and cannot be copied, republished or used in any context without explcit permission from the owner.