Www.dotnetspider.com



TOC \o "1-3" \h \z \u Below are RBS interview questions and answers: PAGEREF _Toc49005495 \h 2What are the various types of solutions in Dynamics CRM? PAGEREF _Toc49005496 \h 2What do you mean by Managed solution? PAGEREF _Toc49005497 \h 2What do you mean by unmanaged solution? PAGEREF _Toc49005498 \h 3Define a Plugin? PAGEREF _Toc49005499 \h 3What is a workflow? PAGEREF _Toc49005500 \h 3What Is The Difference Between Dialogs And Workflow? PAGEREF _Toc49005501 \h 3Maximum Number Of Processes, Stages, And Steps In Business Process Flow's? PAGEREF _Toc49005502 \h 3What Will Happen If Multiple Profiles Assigned To User/team? PAGEREF _Toc49005503 \h 5What Are Requirement Levels We Have To Create A New Field For An Entity? PAGEREF _Toc49005504 \h 5What Are The High Level Steps To Enable Field Level Security? PAGEREF _Toc49005505 \h 5What the different images are available?in the plugin event execution pipeline? PAGEREF _Toc49005506 \h 5Supported messages for custom entities? PAGEREF _Toc49005507 \h 6Event execution pipeline? PAGEREF _Toc49005508 \h 7Certification Questions/Answers PAGEREF _Toc49005509 \h 8Connecting to CRM. PAGEREF _Toc49005510 \h 10Business Rules PAGEREF _Toc49005511 \h 13Business process flow (BPF) PAGEREF _Toc49005512 \h 13CRM Solutions PAGEREF _Toc49005513 \h 14How to modify a Managed solution PAGEREF _Toc49005514 \h 14Can Default solution be exported as a managed solution? PAGEREF _Toc49005515 \h 14About Plugin PAGEREF _Toc49005516 \h 15Data Migration PAGEREF _Toc49005517 \h 16Reporting PAGEREF _Toc49005518 \h 16Power Apps- PAGEREF _Toc49005519 \h 17Below are Infy interview questions and answers:What are the various types of solutions in Dynamics CRM?Ans:?There exist two Dynamic CRM solutions. They are unmanaged and managed. One can answer that default solution is also there in Microsoft Dynamics of an instance.What do you mean by Managed solution?Ans:?Managed solutions are a kind of completed package with the help of which one can distribute and install in the respective CRM organizations.Ans:?No, we cannot export default solution as a managed solution.What do you mean by unmanaged solution?Ans:?An unmanaged solution can be defined as a collection of customizations unmanaged in nature. It is worthwhile to note that customized solution unmanaged in nature and its components may be interrelated with some unmanaged solutions. One can export a solution as a managed solution. Moreover, the customizations cannot be rolled back once they are imported into CRM.Define a PluginAns:?It lays emphasis on the basics of Plugins. In this context, it is always worthwhile to note that Plugin refers to a custom logic which would modify the behavior of the CRM. It is also interesting to note that Plugins are also registered in platforms related to CRM against events that correspond to create, delete and update. It also requires programming language with the concepts of CRM and SDK.What is a workflow?Ans:?Workflow facilitates the atomization of? ?the documents, information and tasks pass from one user to the customers. Moreover, the actions are carried out with the help of certain rules. The workflow structure facilitates many components that can be used by administrators and business users in a bid to model the structure of their business information. Microsoft Dynamics CRM facilitates the developers with a new variety of mechanisms so that they can always alter the standard behavior which is required by their applications related to business.?What Is The Difference Between Dialogs And Workflow?Ans : Dialogs refers to synchronous processes which requires user input, a wizard like interface. Where as Workflow refers to Asynchronous process which requires no user input and its an background process?Maximum Number of Processes, Stages, And Steps In Business Process Flow's?Ans :To ensure acceptable performance and the usability of the user interface, there are some limitations you ?need to be aware of when you plan to use business process flows:? ? There can be no more than 10 activated business process flow processes per entity.? ? Each process can contain no more than 30 stages.? ? Multi-entity processes can contain no more than five entities. What will Happen If Multiple Profiles Assigned To User/team?Ans : User/Team receives the least restrictive permissionsWhat Are Requirement Levels We Have To Create A New Field For An Entity?Ans :OptionalBusiness recommendedRequiredWhat Are The High Level Steps To Enable Field Level Security?Ans :Enable field-level security for an attribute/field.Create a field-level security profile.Associate users or teams with the profile.Add specific field permissions, such as Create, Update or Read for a specific attribute to the profile.How can we relate relationships with Sub grid?What are the considerations for preparing Design doc for CRM requirements?Understand whether to go for Online (cloud) or On-prem- mostly client decides.Based on requirements, decide whether things can be achieved using OOTB or need customizations/coding.Scope and Out of scope requirements.Get to know the size of business/no. of end usersGet to know the domain. Like Banking insurance, Finance, Telecom etc.Decide on which modules of CRM are involved- Sales, service, Marketing…Severity and priority of the requirements.English or any other languages involved as part of implementation.Security requirementsMobile supportRequirements for Data migration /ReportsFunctional requirements?Non-Functional Requirements (NFRs): Availability: 99.9% uptime , Scalability (scalable to over 5,000), Backups, Disaster Recovery, Performance?Code optimization and performance.Adaptability of changes for future enhancements.- Ex: Estimation of requirementsSOW (Statement of Work) contents.Technical/functional scope/out of scope- DependenciesTrainingDocumentationInfrastructure detailsReporting & MeetingsPricingWarranty**We have 100 user licenses in for Production instance How can we restrict login for sandbox (Dev/SIT) instances?In Admin portal There will be Groups (1 each for each instance. For the respective instance/group add the users (can be added by Global admin only) who needs to be accessed. Accordingly, users will get access to the instances (based on those groups).How to convert Multiselect option to Lookup values without affecting existing data?How do we make correction to Production data (bulk update)? Ex: prefix FirstName with salutation.What is Org owned entity and user owned entity.While creating any Entity, there is field called Ownership. User Owned Entity: If ownership is set to User/team then we need to use security roles to provide access and if we want to give permissions to any other users, then we need to add those users to Access Owned Entity: Security privileges applicable is – Either Org level or None.Owner field- Not present on this type Org owned Entity/record.Ex: Currency, Product, product groupWhat all can be done with Org service? Ex: Service. Create, .Update, .RetrieveBackup/restore using Admin center.Difference b/w background and real-time WF?Realtime WF can be on-demand process also. Want to have a control on Html page-outside CRM (ex: phone no.) where phone has to be retrieved and shown on html form.create org srv service , get data for record, bind to controlHow to refresh ribbon button?Power automate- No synchronous WF supported soon.How Pull data from Account and fill up data for fields like email, phone on primary Contact.How to decide on JS or Plug if same requirement can be achieved using both?Developer tool kit- Intv-23/SepChannel integration frameworkdiscovery srvThe?Discovery?web?service?(ex: ) is used to determine the organizations that a user is a member of, and also it provides connection information.And the Endpoint address URL or Organization Service (ex: ) is used to access the Organization?service?or Web API for each of those organizations.schema based integrationRecord based and role based securityRole-based security?controls access by entity type.?Record-based security?controls access to individual?records. Field-level security?controls access to specific fields.BU – A, B and CHow can we make records in BU-B can have access to users in BU-C?Access teams, modifying security role…list any otherWhat is inbound and outbound in integration?Early binding Vs Late binding.New feature in D365 (CRM+ERP/AX)Enhancements: -UCI/ Model-driven apps: ISH=> CSHField serviceVirtual EntityMulti select Option set (New DT added and 150 options available): Semicolon separated values in view field, contain values/does not contain values options available in adv Find…Limitation of MS OS: We cannot add this field to the header section of a form.This field is not available in BR, BPF and not available in check condition in WF…Autonumbering API:Create a console App in VS-> Run console App->EMP ID field gets generated->place it on a form->create a record-> save the form-> Emp Id gets generated in the specified format.Developer GuideDeprecations: -DialogsJS Xrm.page contextD365 for OutlookSilver lightContractsCertification Questions/Answers is POA(PrincipalObjectAccess)?table? - Security and sharing information storedDiff b/w Pre-val and post EventSandbox isolation mode - A plug-in or custom activity can make use of the full power of the Microsoft Dynamics?CRM?SDK to access the organization web service.Correcting production data ? use WFCreate a WF to trigger after 1 month and send Email Add steps Wait condition and Send EmailWhat is the Command to consume Web API?If user-1 is in parent BU and user-2 in child BU. If Contact is set for Read permission at Parent-child BU, will user-2 able to see that contact? ? Unable to seeDiff between enable rule and display ruleJS for getting Option set and Lookup field valueDecision on Sync/AsyncWhere can we see 2min setup for plugin. In case we find 2min not enough post dev of plugin then wat is approach to switch?Retrieve vs RetrieveMultipleRetrieve retrieves a single record given the record ID, the method requires 3 parameters: the entity logicalname, the record ID and the columns (attributes) you want to retrieve.RetrieveMultiple runs a Query against CRM, normally a QueryExpression is used that defines the entity logicalname, the conditions of the query and the columns (attributes) you want to retrieve. It returns always an EntityCollection object and the Entities property contains the list of the records that satisfy the query conditions.Schema Name vs Logical?NameThese both names are similar except character casing. Schema names must be in Pascal case as per CRM naming conventions and logical name (schema converted to logical name internally) will be always be in lower.Steps to share model-driven Apps.How to set up service bus connect and post messages to que/topic.What are Queue and Topic in SB?Ways for authentication of CRM Client credentials, oAuth, OrgSvc, Web API (REST Full svc)Active Directory and Claims-Based AuthenticationUse connection strings in XRM tooling to connect to Dynamics 365 Customer Engagement (on-premises)- the Dynamics 365 Customer Engagement Web API (REST Full svc)Use the Dynamics 365 Customer Engagement Organization Service.How to create custom Activity entity?How user in BU2 can access records owned by BU1?If a button on UCI is not visible (as in classic), what cud be the reason?Difference between User owned record and Org owned record?Filtered view and filtered lookup?Views can be configured/edited using “Edit Filter Criteria” to show data for a Entity by filtering on various fields.Can we use SSIS instead of Kingsway soft?Update/create CRM record in external system (2- way integration)Kingsway soft- All about Entity changes, token, source/destination setupHow to retrieve/query delta data using Kingsway?What all setup (license, accounts) is needed to move to azure (fApp, wjob etc)?Any reason for restriction of 2min timeout in Plugin reg tool?Why to use multiple re try count in fApp/Service bus?Azure Queue vs TopicHow to connect to Azure Service bus using c#Set up SB endpoint. Ex: "ServiceBusConnection": "Endpoint=sb://ashokdev.servicebus.;SharedAccessKeyName=ashokdevAP;SharedAccessKey=+P4POBB9rmKu9isfW3VslbHfTwRWqrCa+Z8kyTuvles=",And also pass params like below-Queue/Topic nameMsgSourcekey=source , Value= <external system name>MsgSourcekey= Destination, Value= Dynamics365Operation= create/updateSend msg to que-var QueueClient = new QueueClient(serviceBusCon, queueName); QueueClient.SendAsync(messageProperties).GetAwaiter().GetResult();QueueClient.CloseAsync().GetAwaiter().GetResult(); Connecting to CRM.Ways to expose D365 API’s to external applications bearer tokensCredentials(using user IDs and password) – the ‘Basic Auth’ modeUsing API keyDigest AuthOAuth 1.0OAuth 2.0Hawk AuthenticationAWS SignatureNTLM Authenticationstring crmWebApiURL = Environment.GetEnvironmentVariable("CrmApiUrl");string requestUriValue = string.Format("{0}{1}({2})", crmWebApiURL, entityName, recordId);HttpRequestMessage updateReq = new HttpRequestMessage(HttpMethod.Patch, requestUriValue);updateReq.Content = new StringContent(resObj.ToString(), Encoding.UTF8, "application/json");HttpResponseMessage updateResponse = crmHttpClient.SendAsync(updateReq).GetAwaiter().GetResult();Example Client Credentials/Connection WizardExample of Connection stringprivate static IOrganizationService GetService() { CrmServiceClient crmSvc = new CrmServiceClient(ConfigurationManager.ConnectionStrings[Connection_Name].ConnectionString); organizationService = (IOrganizationService) anizationWebProxyClient != null ? (IOrganizationService) anizationWebProxyClient : (IOrganizationService) anizationServiceProxy; return organizationService;}OData query to perform CRUD operations in CRMfunction OnSave_OTCompliance(executionContext) { var warningMessage = { text: " \nCompliance record with this Training Group already exists." }; var alertOptions = { height: 130, width: 500 }; var formContext = executionContext.getFormContext(); var complianceType = formContext.getAttribute("crm_compliancetype"); var contact = formContext.getAttribute("crm_contact"); var onlineTrainingGroup = formContext.getAttribute("crm_onlinetraininggroup"); var contactId = null; var onlineTrainingGroupId = null; if (complianceType != null && contact != null && onlineTrainingGroup != null) { var complianceTypeValue = complianceType.getValue(); if (contact.getValue() != null) { contactId = contact.getValue()[0].id; } if (onlineTrainingGroup.getValue() != null) { onlineTrainingGroupId = onlineTrainingGroup.getValue()[0].id; } if (complianceTypeValue != null && complianceTypeValue == "171060004" && contactId != null && onlineTrainingGroupId != null) { if (formContext.data.entity.attributes.get("crm_onlinetraininggroup").getIsDirty()) { var req = new XMLHttpRequest(); req.open("GET", Xrm.Utility.getGlobalContext().getClientUrl() + "/api/data/v9.1/crm_compliancerecords?$select=crm_compliancerecordid&$filter=crm_compliancetype eq 171060004 and statecode eq 0 and _crm_contact_value eq " + contactId + " and _crm_onlinetraininggroup_value eq " + onlineTrainingGroupId, false); req.setRequestHeader("OData-MaxVersion", "4.0"); req.setRequestHeader("OData-Version", "4.0"); req.setRequestHeader("Accept", "application/json"); req.setRequestHeader("Content-Type", "application/json; charset=utf-8"); req.setRequestHeader("Prefer", "odata.include-annotations=\"*\""); req.onreadystatechange = function () { if (this.readyState === 4) { req.onreadystatechange = null; if (this.status === 200) { var results = JSON.parse(this.response); //If Compliance with same OTG already exists then show warning message else save. if (results.value.length > 0) { Xrm.Navigation.openAlertDialog(warningMessage, alertOptions, function () { }); executionContext.getEventArgs().preventDefault();1 } else { formContext.ui.controls.get("crm_onlinetraininggroup").setDisabled(true); } } else { Xrm.Navigation.openAlertDialog(req.responseText, alertOptions, function () { }); } } }; req.send(); } } How can non CRM users interact with CRM to capture some data ex: questionnaireThere is a field which is supposed to take only numbers but this change went to Prod with the field accepting Text (as managed solution). How to change datatype of this field without affecting existing data?- How to modify Managed solution?I have a contact form with address fields (addr1 , add2, addr3, city, state, country, Zip etc.). Requirement is – we should restrict duplicate address for any of these fields values.Ex: if addr1 has value as “1st main , 2nd cross” and if user tried to enter same value then we should restrict this.There is a HTML page with few fields similar to contact fields in CRM. How to populate data from CRM for these fields(same data as in CRM).Customer satisfaction surveys – using Microsoft Forms Pro in Javascriptif (formContext.data.entity.attributes.get("crm_traininggroup").getIsDirty())Set form field as Mandatory on load- add below logic on on-load event of form. if (onlineTrainingGroup != null && onlineTrainingGroup != undefined) { formContext.getAttribute("crm_onlinetraininggroup").setRequiredLevel("required");What all components will be passed to CRM solution after deploying pluginPlugin assembly (DLL).If Searchable on Entity properties is set to No, what happens?Allow text wrapping in form fields labels and valuesSettings Administration System Settings Allow text wrapping in form fields labels and values YESNon interactive users in CRMSecurity- Users- Change access type to “Non interactive” so that user will have limited access to CRM.Inherited security role – Hierarchy of securityEx: Mgr and TL can see developer records and their own records TL can see developer records and his own recordsDeveloper can see only his own records.What is output parameter in Plugins?OP params are applicable only for post-operation.Datetime field – behavior Time zone independentAbility to record customer satisfaction surveys in a reportable formatAbility to free text field for notesAllow for risk assessments to be undertaken, maintained and recorded against referred clients.If I have create prv at teams level (I am part of a team) and at user level if don’t have create prv, will be able to create that entity?I am creating a contact with Email ID as ‘ashok@’ and mobile# as 12345xxWhen another user tries to create with another contact with same values, how will be restricted (there is a OOB feature to do this).User A is a sales manager and user B is a service manager. How do we restrict only Sales module to user A and service module/entities to user B?- Using Model driven Apps.How to create a Product in CRM (all the steps)?How to connect to service bus?How Azure is connected to CRM?What all findings will be captured by Solution checker?OData syntaxWhat all tool have you used?Plugin reg toolPostmanService busXrm ToolBox.How to restrict few fields for few users? – Use Field security profile (FSP).What are Actions and how to consume them in system WF?- with examplesIntegration with WhatApp- behavior in security.Auto numbering for limited Entity fields.Using plugin Xrm toolbox features added in D365 9.0Multiselect option setAuto numbers by API.Virtual entitiesWeb hooks integrationUnified interface (ISH= CSH)Disadvantages of Multiselect Optionset?How does knowing no. of CRM users help for a CRM developer?Data export/Import in/out D365 RulesBR can be used to on the Actions– set default, lock/unlock fields, make field mandatory, show error message, set field value, set visibility.All the above Actions should be under the Condition (IF/THEN/ELSE).BR Scope can be at Entity level and All Forms.BR Scope can be at field level and All or Particular forms.There can be max 10 If/Else conditions in each BR.There can be max 5 entities in each BR for which BR can be applied.Sample of BR-Business process flow (BPF)*BPF needs to be Activated: BR design screenSet Order of process by using Order process flow on BPF screen. ** If we want to set Process at form level, then use – (on UCi form)- Process- switch process – choose the required BPF. CRM FlowCRM SolutionsHow to modify a Managed solutionEx: There is a field which is supposed to take only numbers, but this change went to Prod with the field accepting Text (as managed solution). How to change datatype of this field without affecting existing data?- How to modify Managed solution?Can we create a new solution as Managed?No, by default solution can only be Unmanaged while creating (PackageType=UnManaged). But we can export it as Managed.Can Default solution be exported as a managed solution?Exporting the default solution is not supported..Exporting the Managed solution is not supported..Dynamics 365 cannot clone the Managed solution so versioning is NA..When Managed solution is deleted/uninstalled it removes all customizations which are part of that Managed solution.When UM solution is deleted/uninstalled, it will not remove the changes as changes will become part of Default solution (after publish customizations)..UM solution is recommended for Sandbox instances (as it involves multiple changes during development phase) and MS is recommended for Production instances or distribution to 3rd pare solution/environment changes between two environments (ex: Dev and SIT)Use System customization comparer plugin of XRM Toolbox.Adding components to UM solutionDynamics 365/CRM metadata: While adding components to UN solution, there is an option to *include entity metadata and/or *Add all AssetsInclude metadata ensures adding Logical name, Display name, Schema name, Attribute’s data type, IsAuditEnabled, IsManaged etc.What all CRM components can be added to solution?Entities/forms/fields/views/Br./’Global option sets./’Client extensions (site map modifications) ./’Processes (WF, BPF, Actions, Dialog*) * deprecated in 9.0./’Web resources./’’Plug-in Assemblies./’Security Roles./’Field Security Profiles./’Reports./’Model-driven Apps./’Entity Data TypeSingle Line of Text, Multiple Lines of Text, Option set, Two options, Image, Lookup, Currency, Customer, Datetime, decimal, Whole Number, FileEntity field formatsEmail, Text, Text area, URL, Ticker symbol, PhoneShare vs AssignShare – Ownership will be shared with other user.Assign – Ownership will be transferred to other user.ClickDimensions Email Template Vs CRM(OOTB) email templateCRM (OOTB) Email template- Settings- TemplatesWe can use OOB Email template in WF like below..Types of OOTB templates- Global and Entity level (ex: contact, account, user etc.)We need to use Entity level template when dynamics values are required from Single entity. Ex: Contact template.Global template- If we need to access fields from related entities.We can add OOTB templates to Solution and deploy to other environments.ClickDimensions (cdi) Email Template- Settings- Email Marketing- Email TemplatesWe can use CD Email template in WF like below..We CAN’T add CD template to Solution. Deployment of these templates must be handled separately for build/deploy.CRM Relationships1:N 1:N will be created on Primary Entity (Student) with secondary entity as Related Entity(Student course).Lookup will be created on N side (ex: Student field lookup will be created on Student course record).**In reverse of this, if we create a lookup field then relationship will automatically be created.N:1 (Lookup created on)N:1 will be created on secondary entity with Primary Entity (Student course) as Related Entity(Student).Lookup will be created on 1 side (ex: Student field lookup will be created on Student record).N:N (Lookup created on )Relationship behaviors(A) Parental: If parent record is deleted/deactivated/Assigned then related child record also gets deleted In Student to StudentCourse update Type of behavior in 1:N to ‘Parental’Ex: If Student(parent) is deleted all the associated Student courses (child) will also get deleted. The relationship between Student: StudentCourse is 1:N where 1 student can have N courses.(B) Referential: In Student to StudentCourse update Type of behavior in 1:N to ‘Referential’If parent is deleted, then values of child records exists but value of the lookup field (student Name) will get Blank.Ex: When Parent record Student is deleted, the Student course record still exists but value of Student field (in Student course) gets blank.? Referential, Restrict Delete: In Student to StudentCourse update Type of behavior in 1:N to ‘Referential restrict Delete’Ex: If we try to delete Parent record (Student) which has the associated child records (student course), then we get business process error - Deletion of parent is restricted and we get [below error message]. In case we want to delete parent then delete all associated courses first and then delete Parent (Student).Quick view Form measure and enhancement in CRMAll About JavascriptGet form typevar formType = formContext.ui.getFormType();Get form namevar formName = formContext.ui.formSelector.getCurrentItem().getLabel();RefreshRibbon?Causes the ribbon to re-evaluate data that controls what is displayed in it.formContext.ui.refreshRibbon(refreshAll);formContext.getControl("crm_sortcode").clearNotification();Get form context- Function GetXX(executionContext)-> On Event handler- Parameters- Enable/check ‘Pass execution context as first parameter’{ Var formContext = executionContext.getFormContext(); }*Need to check like if (formType != null && formType == 2) {--}JS for getting Option set and Lookup field valueExample: Get Value and text of OptionSet ‘Contact Method’function GetOptionsetValues(executionContext){var formContext = executionContext.getFormContext();var OptionValue =formContext.getAttribute("preferredcontactmethodcode").getValue();var OptionLabel = formContext.getAttribute("preferredcontactmethodcode").getText();alert("OptionLabel ="+ OptionLabel +" OptionValue =" + OptionValue);alert);}Result Ex: On Load of Lead form OptionLabel/Text = Any ; OptionValue = 1Get Value and text of Lookup ‘Contact Method’//Get Lookup?Text / ID / EntityNamefunction GetLookupValues(executionContext){var formContext = executionContext.getFormContext();var CurrencyName=formContext.getAttribute("transactioncurrencyid").getValue()[0].name;var CurrencyID=formContext.getAttribute("transactioncurrencyid").getValue()[0].id;var CurrencyType=formContext.getAttribute("transactioncurrencyid").getValue()[0].entityType;alert("CurrencyName= "+ CurrencyName + "; CurrencyID= "+ CurrencyID +" CurrencyType= "+ CurrencyType);}Result on Load of Lead form-CurrencyName= US Dollar; CurrencyID= {4CEDD78C-B6CD-EA11-A814-000D3A0A82A5}; CurrencyType= transactioncurrencyEmail address validationOnfield Change-OnChange_CheckEmailFormat: function (executionContext, fieldName) { var formContext = executionContext.getFormContext(); var regEx = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$/; var msg = "Please provide valid email address."; if (formContext.getAttribute(fieldName) != null && formContext.getAttribute(fieldName) != undefined && formContext.getAttribute(fieldName).getValue() != null) { NHSP.CRM.OSA.Application.checkFormat(formContext, fieldName, regEx, msg); } else { formContext.getControl(fieldName).clearNotification(); } }JS to hide Ribbon button on form (contact forms).Ex: Show Generate Compliance record button on few forms only (and hide from remaining forms).function IsComplianceButtonVisible(primaryControl) { var executionContext = primaryControl; var isFormValid = false; var isRoleValid = false; var formName = executionContext.ui.formSelector.getCurrentItem().getLabel(); switch (formName) { case "Contact": case "Applicant/Line Manager": case "Application Details": case "Form For TLC": isFormValid = true; break; default: isFormValid = false; }}Open a new form with prefilled values on the form.Ex: Open compliance form with filled values for Compliance Type=DBS, EmailSent= false, Contact name= contact’s lookupValue , Current contact Id (Contact on which button will be clicked)- FormIdfunction CreateDbsComplianceOnButtonClick(primaryControl) { var formContext = primaryControl; var formId = formContext.data.entity.getId(); //Form ID and Contact record Id are same?? var currentContact = formId.replace("{", ""); currentContact = currentContact.replace("}", ""); var firstname = formContext.getAttribute("firstname");var lastname = formContext.getAttribute("lastname");var fullName = firstname.getValue() + lastname.getValue() ;if (fullName != null && fullName != "undefined") { var contactName = fullName; } var entityFormOptions = {}; entityFormOptions["entityName"] = "crm_compliancerecord"; //Assign GUID of Entity:Compliance, Form:DBS entityFormOptions["formId"] = "4f201f0d-9e4b-4e17-8b6c-a774daf785a3"; // Set default values for the Compliance form var formParameters = {}; formParameters["crm_compliancetype"] = "171060007"; formParameters["crm_emailsent"] = false; formParameters["crm_contact"] = currentContact; formParameters["crm_contactname"] = contactName; // Open the form. Xrm.Navigation.openForm(entityFormOptions, formParameters).then( function (success) { }, function (error) { Xrm.Navigation.openAlertDialog({ text: error }, alertOptions); });}Set/Show BPF on a particular Form.function setDefaultBPFForLeadApplication() { //GUID of the select form – can be found in the form URL var formGuid = '3dDD460CF9-B3E5-451E-93A4-CFB72D5D6C04'; //GUID of the custom Business Process Flow – can be found in the Business Process URL var procesGuid = '13A0A7B1-CB43-4818-BA86-7045FEA0D372'; //If the entity is new and is not on the correct process id then re-direct. if ( (Xrm.Page.data.entity.getId() == null || Xrm.Page.data.entity.getId() == 'undefined'|| Xrm.Page.data.entity.getId() == '') && (Xrm.Page.context.getQueryStringParameters().process == null || Xrm.Page.context.getQueryStringParameters().process != procesGuid) ) { var parameters = {}; parameters["formid"] = formGuid; parameters["process"] = procesGuid; Xrm.Utility.openEntityForm("lead", null, parameters); // this opens the new lead form with the specific process displayed. }}RetriveContactDetailsFromCRM (in application.js)Fill/populate subgrid on conditionError Handling in Javascript (UCI)All About OOB workflowIf a WF is running in Dev instance but same WF is not triggering/running in SIT/UAT, what can be the reason?Reasons:-Check the scope of the WF. If it is at user level and if that user is not present in SIT/UAT. So as far as possible keep WF in Org scope and run in Admin context (owner should be service account/admin account).var filterExpression = new FilterExpression(); expression.AddCondition(new ConditionExpression("isdisabled", ConditionOperator.NotEqual, true)); QueryExpression query = new QueryExpression() { EntityName = "systemuser", ColumnSet = new ColumnSet("systemuserid", "fullname"), Criteria = filterExpression, }; var linkedLicenses = new LinkEntity { LinkFromEntityName = "systemuser", LinkToEntityName = "licence", LinkFromAttributeName = "systemuserid", LinkToAttributeName = "agentid", JoinOperator = Microsoft.Xrm.Sdk.Query.JoinOperator.Inner }; var linkedProfile = new LinkEntity { LinkFromEntityName = "profile", LinkToEntityName = "licence", LinkFromAttributeName = "profileid", LinkToAttributeName = "profile", JoinOperator = Microsoft.Xrm.Sdk.Query.JoinOperator.Inner }; linkedProfile.LinkCriteria.AddCondition(new ConditionExpression("mode",ConditionOperator.Equal,true)); linkedLicenses.LinkEntities.Add(linkedProfile); query.LinkEntities.Add(linkedLicenses);When to Use the Secured vs Unsecured Configuration for Plugins?Secured config values (Xml, variables) Can be accessed by Admin only. Unsecure configuration information could be read by any user in CRM. Remember its?public?information? (Ex: Parameter strings to be used in plugin could be supplied here)What the different images are available?in the plugin event execution pipeline??Supported messages for custom entities?Custom entities can be either organization-owned or user-owned, which defines the set of messages available for the entity. The following table lists the messages for custom entities that support the execution of plug-ins.Message NameOwnership TypeMessage AvailabilityEntity Supported DeploymentAssignUser-owned entities onlyServerServerCreateUser-owned and organization-owned entitiesBothServerDeleteUser-owned and organization-owned entitiesBothServerGrantAccessUser-owned entities onlyServerServerModifyAccessUser-owned entities onlyServerServerRetrieveUser-owned and organization-owned entitiesBothServerRetrieveMultipleUser-owned and organization-owned entitiesBothServerRetrievePrincipalAccessUser-owned entities onlyBothServerRetrieveSharedPrincipalsAndAccessUser-owned entities onlyBothServerRevokeAccessUser-owned entities onlyServerServerSetStateUser-owned and organization-owned entitiesBothServerUpdateUser-owned and organization-owned entitiesBothServerStatuses of WF (Draft, Activated)WaitingRunningSucceededSystem Job statusesCompletedLocked ReadySuspendedHow to change ownership of Processes( WF, BPF, Action)? We can do Bulk update/assign ownership to the required Team/OwnerGet the list/count of Draft, Activated, unmanaged Processes and after updating owner, make sure you have not touched the processes already in Draft status.Filter for Activated/unmanaged processes using Advanced Find.Select the processes you need to change the ownershipUse the Assign button on the ribbon, a popup would appear.On the popup, select the Assign to value as User or team and choose the User of Team value as the new user who would own the processes.?The processes would now be in the Draft state, you can select them and activate them.Event execution pipeline?When you register a step using the Plug-in registration tool you must also choose the?Event Pipeline Stage of Execution. Each message is processed in a series of 4 stages as described in the following table:NameDescriptionPreValidationFor the initial operation, this stage will occur before the main system operation.This provides an opportunity to include logic to cancel the operation before the database transaction.Subsequent operations triggered by extensions registered in other stages will pass through this stage as well but will be included within the transaction of the calling extensions.This stage occurs before any security checks are preformed to verify that the calling or logged-on user has the correct permission to perform the intended operation.PreOperationOccurs before the main system operation and within the database transaction.If you want to change any values for an entity included in the message, you should do it here.Avoid cancelling an operation here. Canceling will trigger a rollback of the transaction and have significant performance impact.MainOperationFor internal use only.PostOperationOccurs after the main system operation and within the database transaction.Use this stage to modify any properties of the message before it is returned to the caller.Avoid applying changes to an entity included in the message because this will trigger a new Update event.Plugin Execution stages/pipelinesPre-validation (Sync only) (Sync only) (Sync or Async) Relations and pre-Validation plugin- stage: This stage can be used if we want to display user an Alert when we try to Delete Parent (Student) which has Child (associated Student courses) where Type of behavior is “Referential” between Student and Student courses (1:N).Register plugin with below logic on “delete” of “Student” with execution pipeline as “Pre-Validation”.Logic of plugin (Pre-Validation) goes like belowGet plugin context (svc provider.GetService(type of (IpluginCotext))ServiceFactory= (IOrgSvcFactory) svcProvider.GetService(type of(IOrgSF));IOrgSvc= SF.CreateOrgSvc(context.UserId);ITRacing Svc= (ItracingSvc). svcProvider.GetSvc(typeOf(ITracing Svc));Check If context.message!=delete && context.stage!=10, then return;Get EntityRef tgtEntity = context.Inputparam[“Target”] as EntityRef;QueryExpr qe = new QueryExpr(“studentcourse”);Columnset = new columnset(“name”);Qe.Criteria.AddCondition(“studentid”, conditionoperator.eq , targetentity.Id)EntityCollection ecCourses =service.RetrieveMultiple(qe);If(ecCourses.count() > 0){Throw new Exception (“Child record of student course is found so parent record can’t be deleted unless child records are deleted.”);}Post-Operation (Sync or Async)Scenario- Create a Task/Activities/Timelines (UCI) on creation of Account.namespace Carl.PluginPostOperationSample{????public class CreateAccount : IPlugin????{????????public void Execute(IServiceProvider serviceProvider)????????{????????????IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));?????????????if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)????????????{????????????????// Obtain the target entity from the input parameters.????????????????Entity entity = (Entity)context.InputParameters["Target"];?????????????????var Task = new Entity("task");????????????????Task.Attributes["ownerid"] = new EntityReference("systemuser", context.UserId);????????????????Task.Attributes["regardingobjectid"] = new EntityReference("account", context.PrimaryEntityId);????????????????Task.Attributes["subject"] = "Visit the website at " + entity["websiteurl"];????????????????Task.Attributes["description"] = "This is a new description";?????????????????// Obtain the organization service reference.????????????????IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));????????????????IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);????????????????service.Create(Task);????????????}????????}????}}Post-Operation (Sync or Async)Scenario: Plugin for creating ProductOffering(custom entity) record on creation of Lead record.This should be post-operation only as creation of ProdOffering needs lead to be created first (lead Guid). Else we get security/permission related error.public class CreateProductOfferings : IPlugin { public void Execute(IServiceProvider serviceProvider) { string selectedProducts1 = string.Empty; string selectedProducts2 = string.Empty; var sb = new StringBuilder(); IPluginExecutionContext pluginExecutionContext = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); IOrganizationServiceFactory factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); IOrganizationService service = factory.CreateOrganizationService(pluginExecutionContext.UserId); if (pluginExecutionContext.InputParameters.Contains("Target") && pluginExecutionContext.InputParameters["Target"] is Entity) { tracingService.Trace("Started"); Entity entity = (Entity)pluginExecutionContext.InputParameters["Target"]; if (entity.LogicalName == "lead") { tracingService.Trace("Lead"); try { OptionSetValue leadSource = null; if (entity.Attributes.Contains("leadsourcecode") && entity.GetAttributeValue<OptionSetValue>("leadsourcecode") != null) { leadSource = entity.GetAttributeValue<OptionSetValue>("leadsourcecode"); } if (entity.Attributes.Contains("new_selectedproducts")) { selectedProducts1 = entity.GetAttributeValue<string>("new_selectedproducts").ToString(); } if (entity.Attributes.Contains("new_selectedproducts2")) { selectedProducts2 = entity.GetAttributeValue<string>("new_selectedproducts2").ToString(); } if (!string.IsNullOrEmpty(selectedProducts2)) { sb.Append(selectedProducts2); } if (!(string.IsNullOrEmpty(selectedProducts1) )) { if (!string.IsNullOrEmpty(sb.ToString())) { sb.Append("," + selectedProducts1); } else { sb.Append( selectedProducts1); } } tracingService.Trace(sb.ToString()); if (leadSource != null && leadSource.Value == 8 && sb.Length > 0 && sb !=null && !string.IsNullOrEmpty(sb.ToString())) //leadsourcecode = Web (8) { tracingService.Trace(leadSource.Value.ToString()); string[] tempProducts = sb.ToString().ToLower().Split(','); string[] selectedProduct = tempProducts. Distinct().ToArray(); foreach (var item in selectedProduct) { tracingService.Trace(item.ToString()); Entity productOffering = new Entity("ibs_productoffering"); productOffering["ibs_product"] = new EntityReference("ibs_prod", new Guid(item.ToString())); productOffering["ibs_productgroup"] = new EntityReference("ibs_groupofproducts", new Guid("A0953C86-ECDA-EA11-A814-000D3A80C0EE")); //CIMB Retail productOffering["ibs_lead"] = new EntityReference("lead", entity.Id); productOffering["ibs_isinterested"] = new OptionSetValue(641140000); //YES service.Create(productOffering); } } } catch (Exception ex) { throw new InvalidPluginExecutionException(ex.Message); } } } }}Plugin Vs Custom WFPlugin: Plugin can be used only when operation seems to take max 2min (plugin timeout).WF: If we want to run logic in the scopes - User, BU, PC BU, Org level and if we want to trigger WF on Create of record, on change of record status, on record field change, on assign, on delete.WF: If we want to have input parameters for operations like sending SMS/WA message (using Twilio) then we can set input params like – Account Sid, Auth token, from WA number, To WA number, from/to SMS no.Plugin can run in Sync /Async modes with pipeline like- Pre-validation, pre-operation, post operation.Plugin dll (strong named) can be registered using PRT by adding steps (with message, entity, user context etc.)Whereas, WF dll (( strong named) has to be registered but no need to register steps but Add STEPS (like WF DLL with methods exposed), check condition, wait condition, create/update/assign, send Email, Perform Action, Change record status, ) can be added DLL is consumed in System-WF.If Plugin and WF are set to run same time on contact, which one executes first and how can we change execution order? Plugin Vs JSPlugin gives more performance compared to JS.Plugin can be run on any actions (save, new , Refresh etc.) of the record whereas JS can be client side only (Form load, on save and on field change).If the code is browser dependent then we need to avoid JS. Then plugin is preferable.Depth of a PlugIn (context.Depth)- purpose is to break infinite loops or to avoid deadlock situation.Input and Output ParametersAll About Custom WorkflowSimilar to Plugins , Custom WORKFLOWs also needs to be registered using PlugInReg tool but no need to add steps. After registration WF appears as DLL appears which can be consumed in OOB WF as STEP.DLL/assemblies required for c.WF areusing Microsoft.Xrm.Sdk;using Microsoft.Xrm.Sdk.Workflow;In case Sdk.Workflow 9.0.2 is not compatible with .Net framework 4.5.2, then uninstall higher version of WF DLL and install lower version like 9.0.0.7.For features like SMS/WhatsApp alerts, we need to have WF with reference to assemblies like- Twilio, Twilio.Rest.Api.V2010.AccountTo pop up for Optional/Required parameters like below, in WF logic we need to declare them.public InArgument<string> entitySchemaName { get; set; } [Input("accountSid")] [RequiredArgument]public InArgument<string> AccountSid { get; set; } [Input("authToken")] [RequiredArgument]public InArgument<string> AuthToken { get; set; } [Input("wfrom")] [RequiredArgument]public InArgument<string> WhatsAppFrom { get; set; } [Input("wto")] [RequiredArgument]public InArgument<string> WhatsAppTo { get; set; } [Input("SMSfrom")]Workflow step-Set properties in step as below.All about RibbonCustomiztionsFew points w.r.to CRM solutionsIf we make any changes to ribbon hide/show on Form, then form needs to be added (ex: contact entity and concerned form).If we make any changes to Subgrid button, then no need to add any entity/form.Enable Rules:Requirement is to Hide Ribbon on particular forms (Contact Entity)Add Contact Entity (without metadata, assets) to a new solution (to be deleted later)Settings-Customizations- RIBBON WORKBENCH 2016 (installed from Admin portal)- Open newly created solution. We get to see the Ribbon UI as seen in above pic.Under Solution Elements (Tabs/groups/Buttons/Hide actions/Commands/Display rules/Enable rules) – Choose Enable rules- click on + mark to add a ruleAdd step- custom rule (ref to below screenshot)- Default= FalseFunction name= IsOnlineTrainingVisibleLibrary = $webresource: crm_ContactRibbonWithin custom rule – add CRM parameter as Primary control (To pass global context to JS function).**No need to add any JS on form.ADD New COMMANDAdd a Command (+) under COMMANDSAdd enable rule to it. If we want Ribbon to perform any action on click of it - Add actions like below.Action on click of Ribbon button, where it opens up a new form with few fields values pre-filled.The logic for Function name (mentioned in above pic) is as show below.function CreateOTComplianceOnGenerateOTClick(formContext) { var formType = formContext.ui.getFormType(); if (formType != null && formType != '1') { var contactId = formContext.data.entity.getId(); var resContact = contactId.replace("{", ""); resContact = resContact.replace("}", ""); var contactName = formContext.getAttribute("fullname").getValue(); var entityFormOptions = {}; entityFormOptions["entityName"] = "crm_compliancerecord"; //Assign GUID of Entity:Compliance, Form:OT entityFormOptions["formId"] = "283B9E7C-47C9-45A1-A5C8-8DF1E4427ED0"; var parameters = {}; parameters["crm_compliancetype"] = "171060004"; parameters["crm_emailsent"] = false; if (resContact !== "" && contactName != null) { parameters["crm_contact"] = resContact; parameters["crm_contactname"] = contactName; } // Open the form. Xrm.Navigation.openForm(entityFormOptions, parameters).then( function (success) { }, function (error) { Xrm.Utility.alertDialog(error); }); }}BUTTONCreate a button or use existing button.Mention Id and Command like below.PUBLISH the SolutionObserve status under Messages.- ‘Published successfully’.DISPLAY RULE: this Display rule to commandAdd this Command to the Button (Custom Button) to be hidden.Result of Display rule “Add Existing Compliance” button is hidden now.function IsButtonVisible (formContext) { var isFormValid = false; var isRoleValid = false; var formName = formContext.ui.formSelector.getCurrentItem().getLabel(); switch (formName) { case "Online Training Details": case "Contact": case "Applicant/Line Manager": case "Application Details": case "Form For TLC": isFormValid = true; break; default: isFormValid = false; } if (isFormValid === true && isRoleValid === false) { var loggedInUserSettings = Xrm.Utility.getGlobalContext().userSettings; // Get Logged In User Security Roles var loggedInUserRoles = loggedInUserSettings.securityRoles; isRoleValid = GetComplianceButtonVisiblity(loggedInUserRoles); } if (isFormValid === true && isRoleValid === true) { return true; } else { return false; }}Tools used in CRMPlugin Registration ToolXRM ToolboxPlugins available in Xrm toolboxAuto numbering, System customization comparer, Plugin/WF registration, PostmanService bus explorerAll about UCITo move the entire CRM instance (Environment-wise) to Unified Client Interface:, Reversing UCI back to classic---------Issues in UCI when compared to ClassicXrm.Page is deprecated (not supported in UCI) so we need to use FormContext in Javascripts.Ribbon button may not be visible..Net framework (target) for Plugin must be 4.6.2Depreciated items in UCIComposite controls/fields like Full Name, Address control, Duplicate detection in Lookups etc.Alternate solution for FullName is to concatenate firstname + lastnameXRM.Page: to be replaced with formContextreq.open("GET", Xrm.Utility.getGlobalContext().getClientUrl() + "/api/data/v9.0/crm_systemsettings?$select=crm_applicantdeclaration&$top=1", false);we need to use /api/data/v9.1openDialog() is deprecated in UCI and it must be replaced with openAlertDialog() function (error) { Xrm.Navigation.openAlertDialog({ text: error }, alertOptions); });Issues that can occur post migration to UCI.Browser compatibility issue in UCIData MigrationWithout using paid/licensed tool (like scribe, Kingsway etc.) how can we manage DM using SSIS?DM Tool to Use for a Dynamics 365 Data Migration.Import Wizard (OOB)Dynamics to CRM adapterScribe (paid/licensed tool)SSIS (free/cheep)- for on-premKingsWaySoft (paid/licensed tool)Parameters/points to be considered during data migration?Source and destinationMappingsLookup dataNo. of records.How to take care of look up values and dependencies during DM?How to handle huge data during migration?How to do migration of transactional data and master data?SSIS – for Data migration/Data integrationPre-requisitesSQL server data tools (SSDT)Download/install- SSDTSetup(for vs15)Integration ServicesDownload/install- Microsoft.DataTools.IntegrationServicesDownload and install - ZS Dynamics CRM Destination (to have CRM connector)Create a SSISProjectAdd a new project to Visual studio solutionReportingReport optionsOOB report SSRS report (RDL file, Online) and RDLC (offline report, uses SQL queries (sql or sqlite db) in a dataset)Developments and deployment of reportsSSRS ReportsPre-requisitesVisual studio with BIDS (Business Intelligence Development Studio)Microsoft Dynamics 365 Report Authoring Extension (to have fetch xml querying option as a DataSource)SSRS Reports developmentAdd New Project - Choose Report server project from BIDSAdd New/Existing RDL file – Design RDL according to the requirement/template provided by customer.Go to Report Data (Ctrl+Alt+D)Add datasource-> Choose Embedded Connection type = Microsoft Dynamics 365 FetchConnection string:- for ex: last param OrganizationName/Unique Name is optional.Set credentials Uname/pwd = Crm user or Crm admin credens**Note: If you have more than one organization on the same account, you need to specify organization unique id along with CRM online URL.Syntax: <<CRM ONLINE URL>>;<<Organization_UniqueID>>Example: DataSet(s)Chose datasource and Query types (Text, Table, Store proc)Text= Fetch XML<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"> <entity name="ofs_applicationconfig"> <attribute name="ofs_applicationconfigid" /> <attribute name="ofs_name" /> <attribute name="createdon" /> <attribute name="ofs_value" /> <attribute name="ofs_businessunit" /> <attribute name="ofs_description" /> <attribute name="ownerid" /> <attribute name="createdby" /> <attribute name="modifiedon" /> <attribute name="modifiedby" /> <order attribute="ofs_name" descending="false" /> <link-entity name="annotation" from="objectid" to="ofs_applicationconfigid" alias="notes"> <attribute name="documentbody" /> <filter> <condition attribute="filename" operator="eq" value="bjlogo.png" /> </filter> </link-entity> </entity></fetch>**Above fetch Xml is obtained from Advanced find option- Where Notes is added to Application configuration entity with BJLogo.png as an attachment.Use Query designer option from dataset properties and verify above fetchXml retrives data properly (supply credentials if asked for) And RUN the query.Use Preview option (next to Design) to preview result in Rdl file (supply credentials if asked for).To get the Image/Logo on Rdl reportPlace Image control on RDL design Set Image source=First(Fields!notes_documentbody.Value, "BJ_Logo")Expression = System.Convert.FromBase64String(First(Fields!notes_documentbody.Value, "DataSet2"))MIME Type = image/png (or relevant one)Add dataset to RDL by using above connection details and FetchXml query.Deployment of SSRS reports to CRM D365Ref- to Slaes/Reports OR Settings-> Solutions-> choose existing or create a new solnGo to Reports tab -> New -> Report-> Existing File -> Browse for RDL (which is designed in Reports projects, BUILD succeded, a RDL file from Bin/Debug folder).** If RDL is taken from project direct ,then we get error- Invalid RDL while adding existing report as a report type.CategorizationChoose Categories= Sales reportRelated Record Types = Field Tickets/ Event Logs (choose a relevant one)Display In = Reports area/ Forms for related record types.Save and ClosePublish All customizations from the selected solutionVerifying the reportsOpen the respective record (ex: Event Logs)Run reportChoose the report name (set in reports wizard while creating/browsing report)*Any deployed reports in Crm solutions and want to modify format, logo, query..anything in RDL file, please delete existing RDL from Settings- Customizations-Customize the system (Default solution)-Reports- choose Rdl to be deleted- Delete- PUBLISH all customizations (Publishing is not mandatory) – Refresh List in Reports screen.Next GoTo - Settings- Customizations – Solutions- AppConfig soln/default soln/REPORTS tab – Delete Rdl (if exists here) -> PUBLISH customizations- – Refresh List in Reports screenNext - Add the modified RDL to AppConfig soln/Reports and -> PUBLISH customizations.Few tips related to reportsDate formats in RDL file/SSRS reportsKeep textbox expression like=Format(Fields!createdonValue.Value,"dd/MM/yyyy")Hide Textbox – based on an expressionRight click Textbox- Textbox properties- Visibility- show or hide based on an expressionEx:-=Iif(Fields!ofs_calculatepersonalcostusing.Value = "$",false,true)Date format for a TextBox in RDL.=Format(Fields!createdonValue.Value,"MM/dd/yyyy")Textbox property- Number - DefaultPower Apps-Microsoft?Power Apps?and Microsoft?Power Automate?are part of Microsoft's?Power?Platform. Apps - Cloud based rapid app development (form based) platform.- BI- numbering can be done using PowerApps.Solution checker: Gives error/warnings related to components- Configuration, Plugin, Web Resource etc. with category as High/Low/Medium priority.Choose solution- Run- suggestions like- Client APIs deprecated, – Which detects and gives suggestions about non-usage of FormContext (in place of Xrm.Page).Any unused variables.Xrm.Utility.alertDialog(error.message, null) to be replaced with Xrm.Navigation.openAlertDialog({ text: error }, alertOptions);Where, var alertOptions = { height: 200, width: 500 };CRM webApi version changed from 9.0 to 9.1Plugin- Replace the call to execute the deprecated specialized SetStateRequest message. Use Microsoft.Xrm.Sdk.Messages.UpdateRequest or IOrganizationService.Update insteadUsage of 'debugger' was detected. Do not ship debug helper code in production ponents of Power AppsCanvas Apps- of re-usable components like Map control, Calendar Control, Radial gauge control, Tab control, Dialog control, NumericUpDown Control, ColorPicker ControlModel-driven-apps your apps settings and user experience fundamentalsApp settingsInclude all required entities in your app, even if they are not in the sitemap.Provide the?Read?privilege for?Model-driven app?in the?Customization?tab in the?Security Role?dialog box.Enable the?Unified Interface only?mode if your users don’t need to use the legacy web client. You can still access administration features by selecting?Settings?>?Advanced Settings.Create a simpler app URL. For example: https://*.crm.apps/MyApp*Try to limit the number of apps a user can access.MS Flows/Power AutomateMicrosoft?Power Automate?are part of Microsoft's?Power?Platform. WebJobTo create Web Job in Azure following things are needed.Create a resource group (It needs paid subscription).using Microsoft.WindowsAzure.Storage;using Microsoft.WindowsAzure.Storage.Blob;using Microsoft.Xrm.Sdk;using Microsoft.Xrm.Sdk.Client;using System;using System.Configuration;using System.IO;using System.Linq;using System.ServiceModel.Description;namespace CIMBWebJob{ public class Functions { public static void CRMOperations() { IOrganizationService organizationService = GetService(); try { string batchFileName = ConfigurationManager.AppSettings["BatchFileName"].ToString(); string batchFileContent = GetCSVBlobData("excelfile", batchFileName); Console.WriteLine("The batch file to be processed for backend create/update is: " + batchFileName); batchFileContent = batchFileContent.Replace('\n', '\r'); string[] lines = batchFileContent.Split(new char[] { '\r' }, StringSplitOptions.RemoveEmptyEntries); int recordCount = 0; lines = lines.Skip(1).ToArray(); Console.WriteLine("No.of records available in batch file are: " + lines.Count()); foreach (string line in lines) { Entity lead = new Entity("lead"); string[] columns = line.Split(','); lead.Attributes["firstname"] = (columns != null && (!string.IsNullOrEmpty(columns[0]))) ? columns[0].ToString() : string.Empty; lead.Attributes["mobilephone"] = (columns != null && (!string.IsNullOrEmpty(columns[1]))) ? columns[1].ToString() : string.Empty; lead.Attributes["emailaddress1"] = (columns != null && (!string.IsNullOrEmpty(columns[2]))) ? columns[2].ToString() : string.Empty; lead.Attributes["leadsourcecode"] = (columns != null && (!string.IsNullOrEmpty(columns[3]))) ? new OptionSetValue(Convert.ToInt32(columns[3])) : null; organizationService.Create(lead); recordCount++; } Console.WriteLine("No.of records created/processed in ApacMSInfy are: " + recordCount); } catch (Exception ex) { Console.WriteLine(ex.Message); } } /// <summary> /// Get CRM Organization service /// </summary> /// <returns></returns> private static IOrganizationService GetService() { IOrganizationService organizationService = null; try { ClientCredentials clientCredentials = new ClientCredentials(); clientCredentials.UserName.UserName = ConfigurationManager.AppSettings["UserName"].ToString(); clientCredentials.UserName.Password = ConfigurationManager.AppSettings["Password"].ToString(); organizationService = new OrganizationServiceProxy(new Uri(ConfigurationManager.AppSettings["OrgUri"].ToString()), null, clientCredentials, null); //return organizationService; } catch (Exception ex) { Console.WriteLine(ex.Message); } return organizationService; } /// <summary> /// Read CSV file from bobstorage-excelfile /// </summary> /// <param name="containerName"></param> /// <param name="filename"></param> /// <returns></returns> private static string GetCSVBlobData(string containerName, string filename) { string connectionString = ConfigurationManager.AppSettings[$"BlobStorageconnectionString"].ToString(); // Retrieve storage account from connection string. CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); // Create the blob client. CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient(); // Retrieve reference to a previously created container. CloudBlobContainer container = blobClient.GetContainerReference(containerName); CloudBlockBlob blockBlobReference = container.GetBlockBlobReference(filename); string text; using (var memoryStream = new MemoryStream()) { //downloads blob's content to a stream blockBlobReference.DownloadToStream(memoryStream); //puts the byte arrays to a string text = System.Text.Encoding.UTF8.GetString(memoryStream.ToArray()); } return text; } }}Azure portal managementHow to add/remove credits in azure portal?Delete/cancel subscription(s) first ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download