Today I had to build a method to retrieve a Security Role based on its name and I would like to share it so hopefully it can help anyone. LINQ is used to do the actual search.
Find below a C# method to check if an specified user(Sent as parameter) has System Admin role. The method will return true if so. Otherwise, it will return false. Hope it helps.
Recently, I had to create a plugin that gets all the child Business Units of an specific Business Unit. As this can be a simple task for developers with experience in the customization of the platform, it can also be difficult to new developers. Hence, I wanted to share how I did it in case … Continue reading Get child Business Units based on a Parent Business Unit
Advanced find is a great feature, it allow us to create complex views over different entities very easily. However, it has several limitations that lead us to create views in code, as with this approach, there are much less limitations. Below is an example of code to create a simple view with C#:
Sometimes due to certain requirements, we are asked to get the Metadata of certain Entities. As this request can hit the performance of our organization, we have to manage this type of requests with caution as well as specifying the total information we want to get. To do the request and to specify the metadata … Continue reading Get Entity Metadata