Posts

Showing posts with the label Interview

Security Model of Dynamics CRM

Image
Business Unit –  It is a way to group business activities. When an organization is created, a Root Business Unit is created by default. This Root BU cannot be deleted. Each Business Unit automatically gets a default team , and the team’s name is the same as the Business Unit’s name. Every Business Unit has a parent BU . By default, new BUs have the Root BU as their parent, but you can also create a custom BU and set it as the parent. Every User is linked to only one BU. Team – Group of Users Teams provide access to records through assigned security roles . Security roles assigned to a team are inherited by all its members. Types of Teams : Owner Team Security Group Team Access Team Owner Team → Own records + roles Security Group Team → Same as Owner, but managed via Azure AD Access Team → No ownership, only shared access   Security Roles   Define the access levels and privileges that control what a user can view and perform in the system. They can be assigned direc...

Workflows in MS CRM

Image
Workflows automate business processes within Dynamics 365 CRM. Trigger Points: Create Update Delete Execute As: User or Workflow Owner Scope: Organization (Org) – triggers for all records (commonly used in projects) User – triggers only if the record is owned by the user performing the action Business Unit (BU) – triggers if the record’s owning BU matches the user’s BU Parent-Child BU – triggers if the record’s owning BU falls under the user’s BU hierarchy Types: Synchronous (Real-time): Executes immediately; can throw error messages on the UI. Asynchronous (Background): Runs in the background without blocking the user interface. On-Demand Workflow: If enabled, the user can manually trigger the workflow for a specific record. Common Use Cases: Create or update records based on certain conditions Send emails Call custom APIs Throw error messages based on conditions Limitations: Cannot handle looping scenarios (e.g., retrieving multiple records and p...

Power Automate - [Dataverse]

Image
Power Automate is used to automate operations through triggers and actions . Triggers : Added, Modified, Deleted, Manual (Instant), Scheduled Actions : List Rows, Get a Row by ID, Add a New Row, Update a Row, Delete a Row, Relate Rows, Unrelate Rows, Condition, Apply to Each, Do Until, Switch Scope block in Power Automate is primarily used for error handling . It groups related actions together. Triggers -  Added, Modified, Deleted Change type - Added / modified / delete Table Name - Entity/Table name Scope - User, BU, Parent Child BU, Organization  [Mostly we use Organization] Select columns - Used for modified trigger to mention field names for which flow should trigger Filter rows - To filter the record based on odata query Run as - Flow Owner / Record owner / Modifying user [Mostly we use Flow owner] ------------------------------------------------------------------------------------------------------------------------- Manual Trigger - To Trigger the fl...

JavaScript WebAPI [Xrm.webApi]

In this blog we will see usecase of Xrm.WebApi. Generally, it is used to do CRUD operation in dynamics CRM. Most of the times we will be using retrievemultiple, retrievesingle and updaterecord.All these web api's are asynchronous, that means once we execute api, it wiill not wait for response. It will execute remaining code till we get response from api. The sample code for webapis can be generated by Dataverse REST Builder tool from xrmtoobox.  We will see below use case of WebApi 1. Xrm.WebApi.retrieveRecord -       To retrieve single record      Parameters - entityname, RecordId, OdataQuery[Select] 2. Xrm.WebApi.retrieveMultipleRecords -      To retrieve the record based on condition      Parameters - entityname, odataQuery [Select, filter] 3. Xrm.WebApi.createRecord -       To create record      Parameters - entityname, data 4. Xrm.WebApi.updateRecord -      To...

JavaScript - Show-Hide/ Lock-Unlock/ Required-NotRequired

JavaScript syntax to show Hide different controls :  function showHide(executionContext) { var formContext = executionContext.getFormContext(); //showHide field formContext.getControl("new_field").setVisible(false); formContext.getControl("new_field").setVisible(true); //showHide tab formContext.ui.tabs.get("tab_tabname").setVisible(false); formContext.ui.tabs.get("tab_tabname").setVisible(true) //showHide section formContext.ui.tabs.get("tab_tabname").sections.get("sectionName").setVisible(false); formContext.ui.tabs.get("tab_tabname").sections.get("sectionName").setVisible(true); //ShowHide related entity from related section var navItem = formContext.ui.navigation.items.get("Courses"); if (navItem) { navItem.setVisible(false); } } JavaScript Syntax to lock-unlock fields - function lockUnlock(executionContext) { var fo...

Most Used JavaScript Syntax used in MS CRM

In this blog we will see how we can retrieve different data types fields values in MS CRM using JavaScript. Different types of data types in MS CRM: Single Line of Text Option Set (Dropdown) Two Options (Radio Button) Image Whole Number Floating Point Number Decimal Number Currency Multiple Lines of Text Date and Time Lookup  Single or Multiline Field :  var name = formContext.getAttribute("new_name").getValue(); formContext.getAttribute("new_name").setValue(); Option-Set Field :  int value = formContext.getAttribute("new_type").getValue(); var optionsetText = formContext.getAttribute("new_type").getText(); formContext.getAttribute("new_type").setValue(100); //100 will be the optionset value Multi-Select Option-Set Field :  var multiselectValueArr = formContext.getAttribute("new_multiselect").getValue(); formContext.getAttribute("new_multiselect").setValue([100, 200, 300]); Two-Option Field :  var value = formConte...