SDK: Adding Create Actions (Advanced)
- 25 Jan 2022
- 1 Minute to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
SDK: Adding Create Actions (Advanced)
- Updated on 25 Jan 2022
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Version 7.x .NET Architecture Change
- Versions 7.0.1 - 7.1 require .NET Core 3.1
- Versions 7.2 - 7.9 require .NET 5
- Versions 7.10+ require .NET 6
Adding this interface to a 'service' that is created.
public class MyEntityService : BaseEntityService<MyEntity>
{
public override BaseActionType[] GetCreateMethods(Folder folder, AbstractUserContext userContext)
{
List<BaseActionType> actions = new List<BaseActionType>();
return actions.ToArray();
}
}
Creating entity action factory registered to 'folder'.
public class MyEntityService : BaseEntityService<MyEntity>
{
public virtual void Initialize()
{
EntityActionFactoriesHolder.GetInstance().RegisterObjectForType(typeof(Folder), new MyFolderActionFactory());
}
}
public class MyFolderActionFactory : IEntityActionFactory
{
public BaseActionType[] GetActions(AbstractUserContext userContext, EntityActionType[] actionTypes, IPlatformEntity target, string entityId)
{
List<BaseActionType> list = new List<BaseActionType>();
return list.ToArray();
}
}
Was this article helpful?