Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 118

Commands to Import .bacpac file to D3FOE SQL Server

Introduction: This blog article will explain how to import a .bacpac file to Microsoft SQL Server which is created from Finance and Operations database that is based on Azure SQL Server. You can refer steps here for creating .bacpac file. Following points are recommended for smooth and secure importing of .bacpac file Take a backup of existing database so you can revert if required. Import the database with a new name and modify it later once the entire process is completed error free. Copy the .bacpac file to local computer where you want to import the database for better performance. Steps: Run command prompt as an administrator. Run the below command to Import the database. cd C:\Program Files (x86)\Microsoft SQL Server\130\DAC\bin SqlPackage.exe /a:import /sf:D:\Exportedbacpac\SSProd.bacpac /tsn:localhost /tdn:SSProd /p:CommandTimeout=1200 where, tsn (target server name) – The name of the SQL Server to import into. tdn (target database name) – The name of the database to import into. The database should not already exist. sf (source file) – The path and name of the file to import from. Update the database: Run the following script against your database to add the users you deleted while creating .bacpac file.  Update your database name in Alter Command. CREATE USER axdeployuser FROM LOGIN axdeployuser EXEC sp_addrolemember ‘db_owner’, ‘axdeployuser’ CREATE USER axdbadmin FROM LOGIN axdbadmin EXEC sp_addrolemember ‘db_owner’, ‘axdbadmin’ CREATE USER axmrruntimeuser FROM LOGIN axmrruntimeuser EXEC sp_addrolemember ‘db_datareader’, ‘axmrruntimeuser’ EXEC sp_addrolemember ‘db_datawriter’, ‘axmrruntimeuser’ CREATE USER axretaildatasyncuser FROM LOGIN axretaildatasyncuser EXEC sp_addrolemember ‘DataSyncUsersRole’, ‘axretaildatasyncuser’ CREATE USER axretailruntimeuser FROM LOGIN axretailruntimeuser EXEC sp_addrolemember ‘UsersRole’, ‘axretailruntimeuser’ EXEC sp_addrolemember ‘ReportUsersRole’, ‘axretailruntimeuser’ CREATE USER axdeployextuser WITH PASSWORD = ‘<password from LCS>’ EXEC sp_addrolemember ‘DeployExtensibilityRole’, ‘axdeployextuser’ CREATE USER [NT AUTHORITY\NETWORK SERVICE] FROM LOGIN [NT AUTHORITY\NETWORK SERVICE] EXEC sp_addrolemember ‘db_owner’, ‘NT AUTHORITY\NETWORK SERVICE’ UPDATE T1 SET T1.storageproviderid = 0 , T1.accessinformation = ” , T1.modifiedby = ‘Admin’ , T1.modifieddatetime = getdate() FROM docuvalue T1 WHERE T1.storageproviderid = 1 –Azure storage ALTER DATABASE [<your AX database name>] SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 6 DAYS, AUTO_CLEANUP = ON) GO — Begin Refresh Retail FullText Catalogs DECLARE @RFTXNAME NVARCHAR(MAX); DECLARE @RFTXSQL NVARCHAR(MAX); DECLARE retail_ftx CURSOR FOR SELECT OBJECT_SCHEMA_NAME(object_id) + ‘.’ + OBJECT_NAME(object_id) fullname FROM SYS.FULLTEXT_INDEXES WHERE FULLTEXT_CATALOG_ID = (SELECT TOP 1 FULLTEXT_CATALOG_ID FROM SYS.FULLTEXT_CATALOGS WHERE NAME = ‘COMMERCEFULLTEXTCATALOG’); OPEN retail_ftx; FETCH NEXT FROM retail_ftx INTO @RFTXNAME; BEGIN TRY WHILE @@FETCH_STATUS = 0 BEGIN PRINT ‘Refreshing Full Text Index ‘ + @RFTXNAME; EXEC SP_FULLTEXT_TABLE @RFTXNAME, ‘activate’; SET @RFTXSQL = ‘ALTER FULLTEXT INDEX ON ‘ + @RFTXNAME + ‘ START FULL POPULATION’; EXEC SP_EXECUTESQL @RFTXSQL; FETCH NEXT FROM retail_ftx INTO @RFTXNAME; END END TRY BEGIN CATCH PRINT error_message() END CATCH CLOSE retail_ftx; DEALLOCATE retail_ftx; — End Refresh Retail FullText Catalogs Run the re-provision tool: To ensure Retail components are functional run the re-provision tool. Find steps here on how to run the tool. Start using the new database: Stop the below service to switch the database. World wide web publishing service. Finance and Operations Batch Management Service. Management Reporter 2012 Process Service. Once the services are stopped, rename your original database to ‘AxDB_orig’ and the new database to ‘AxDB’. Restart the service. Conclusion: This is how you can create a new database and import the data from a .bacpac file. If you face any issue then you can switch to original database or restore the copy of original database created prior to import.

Share Story :

[Solved] – Backspace not working in HTML Web Resources

Issue: When we use a HTML web resource in Dynamics 365 CRM forms or even as a separate navigation, we sometimes face issue that Backspace on Text boxes do not work. Why this happens: This happens because in Custom HTML web resources, we add reference to “ClientGlobalContext.js.aspx”. We need this library to gain access to the global context information such as the information specific to the client, organization or user for your Customer Engagement instance* When we use this library, we get issues with backspaces on text boxes where Input type is not “text”. So if the HTML Input type is “number”, “search”, “tel” or anything else Resolution: Resolution 1:  This can be solved by changing the Input type as “Text” for all input textboxes. Then backspace will start working. But this may not be applicable in all scenarios, since it will remove some of the functionality that was intended. In that case, you can use Resolution #2 below. Resolution 2: I have been able to resolve this issue by running the following code on DOM ready: if (window.Sys && window.Sys.UI && window.Sys.UI.DomEvent && window.Sys.UI.DomEvent.prototype) { window.Sys.UI.DomEvent.prototype.preventDefault = function() { }; window.Sys.UI.DomEvent.prototype.stopPropagation = function() { }; } This will allow you to still use the functions that ClientGlobalContext provides, while keeping it from interfering with your key and mouse events. Credit: Stefan Boonstra  * ClientGlobalContext.js.aspx (Client API reference) Happy CRMing!

Share Story :

Dynamics 365 Tip: Sending Emails using Unified Interface

Introduction: The unified client which was released D365 V9 had a very refreshing UI and lots of features. One of the best features in Unified Interface was Timeline view, but the timeline view did not have ability to send emails. The Unified client has a new Email UI with rich text controls and advanced editor. This was not released till recently. So the new environments after v9.0.1.xx have the ability to send emails using the Unified Client. Now you can send Emails using Unified Client like below: Modern Email Editor: Below are some of the features of new Email Editor: Designer, HTML and Preview tabs will allow users to view and format the content across different form factors. A bunch of controls and features provided like advanced styling, linking, find and replace, and insert images and tables will be made available on the email activity and will allow users to format the email instead of relying on external tools or solutions. Note: The Email Editor is not available on D365 Phone App and App for Outlook. It will show all other activities but not email.

Share Story :

Filtering Records on BPF unlike on Form – D365

Introduction: Working with D365 is best when you’re trying to use as much OOB stuff as possible. Simplest configurations like selecting a view for your Lookup field is easily possible on the D365 Form. However, this is not possible on the fields on the Business Process Flow Use of addPreSearch() and addCustomFilter() on BPF Fields: Now, since you have this field on the BPF and want to add filter to Lookup records, you’ll need to use JS customization to achieve this and add your filter’s criteria in the code to show results as expected. Let’s say you see all the lookup records on the field on the BPF 2. I want to see only Semi Annually type of Plans on the Lead. And I can’t simply do this from the Field’s Properties like on the form. Because, it’s not available. 3. Hence, I’ll write JS code as follows to achieve this: // JavaScript source code var oOFFormCustomization = { preFiltering: function () { “use strict”; if (Xrm.Page.getControl(“header_process_cf_defaultplan”) != null) { Xrm.Page.getControl(“header_process_cf_defaultplan”).addPreSearch(oOFFormCustomization.preSearchProductFamily); } else return; }, preSearchProductFamily: function () { “use strict”; var fetchQuery = ‘<filter type=”and”>  <condition attribute=”cf_plantype” operator=”eq” value=”979570001″ /><condition attribute=”statecode” operator=”eq” value=”0″ /></filter>’; Xrm.Page.getControl(“header_process_cf_defaultplan”).addCustomFilter(fetchQuery); } }; 4. And I register the method on Page Load of the Form. 5. And I see these results once it successfully filters!

Share Story :

Filter records in gallery control based on value selected in other gallery control in PowerApps.

Introduction: This blog explains how to Filter records in gallery control based on value selected in other gallery control in PowerApps. Scenario: I am using Dynamics 365 Connection. I have data source named as Time Entry within that data source I have fields named as  Projects  and  Project task and data type of both fields is lookup. Values in Project Task is filtered based on value selected in Project field. Implementation Steps for Filtering Project Task based on Project: We must add Projects and Project Task data source in PowerApps because their data type is Lookup.(If you don’t know how to work with lookup fields Refer: https://www.cloudfronts.com/connect-dynamics-365-use-lookup-field-dynamics-crm-powerapps/ ) Add New screen name it Project Lookup and add gallery control on that screen. Select gallery control and set its item property to:SortByColumns(Search(Filter(Projects,statecode=0 ), TextSearchBox1_1.Text, “cf_name”), “cf_name” ) Add new Screen and name it Project Task Lookup and add gallery control on that screen. Select gallery control and set its item property to:SortByColumns(Search(Filter(‘Project Tasks’,     _cf_project_value =Gallery1.Selected.cf_projectid),TextSearchBox1_2.Text,”cf_name”),”cf_name”)here: Gallery1 is the name of gallery control on Project Lookup screen.

Share Story :

Business Process flows process stage name blank in D365 v9 Customer Engagement

Introduction: In this blog, we will demonstrate a way to display the current active stage of a business process flow in views in D365 v9 as the out of box process stage name field does not show any value in the views. Implementation: Step 1: We have created a basic Business Process flow on contacts which has two stages “Basic Information” and “Contact Details”. Step 2: If we want to create a view with the active stage of the business process flow displayed in the column, we first create a new view and in the Record Type we Select Process Stage(Process Stage) and in the columns we select “Process Stage Name” Step 3: Now when we check the view in Contacts we see that the Process Stage Name is blank. Step 4: One workaround for this is to design a Workflow on the Business Process flow entity that was created as shown in the below image . Here “Contact Infor” is the business process flow entity. Step 5: The workflow will be a Real time workflow and will be triggered when process is applied and on change of “processid” field. When the workflow triggers it will copy the name of the field in a new Text field and this can be used in views to display the current Stage as seen below.

Share Story :

Change Tracking for Data Entities in D365 Operations

Introduction: In this blog article, we will see how we can track changes in data made since last export using Data Entities in D365 Operations. It is basically an SQL Change Tracking feature. Steps: Go to Data Management -> Data Entities. Select the Entity for which you want to enable Change Tracking. In the Action Pane, go to Change Tracking. There are 3 options: Enable primary table – It will only track changes made on root table. Enable entire entity – It will enable tracking for all Writable Datasource used in the entities. Enable custom Query – You can create a custom query to track changes on the required tables. You can also disable the change Tracking by clicking on ‘Disable Change Tracking’ option. You should be careful while enabling change tracking as it will require additional processing for maintaining data for changed records.

Share Story :

How to update the selected line in the Subform on click of an action button in the Mainform in NAV

Introduction: The requirement was such that , the user will select a line in the subform. The subform has fields like the Customer ID, Customer Name, and a field Recieved Crates. On click of the action button in the Main form, a page opens which contains the details of the selected line in the subform  like Customer ID and Customer Name also a field Crate recieved(Integer Datatype). User will enter Crate Recieved and click on OK. The number entered in the Crate received will modify in the Recieved crates field in the subform. This blog explains the step wise procedure to achieve the above output. Pre-Requisites: Microsoft Dynamics NAV 2017 Steps: 1. Open the Developement Environment of Microsoft Dynamics NAV and open the Main form(card Page) and create an action button Received Crate and write the below code. Here, “Crate Lines” is the Page control (subform), Here a call is made to CallLinesfromCard  function with Parameter CratesLine. CallLinesfromCard is a global function made in “Crate Lines”Subform. 2. In the function CallLinesfromCard  in the subform. Below is the code. Here ReceiveCrate is a page. Its the page that open on click of the action button. A function is called CrateReceivedFromCust with parameter CrateLinesTable. 3. A global function is made CrateReceivedfromCust in the page ReceiveCrate. Here global fields variables are made CustomerID,CustomerName,NoOfcratesShipped. Theses fields are autopopulated with values from the selected line. A field Crates Received is also created where the user will enter data. 4. OnQueryClosePage of Receive Page, below code is written to modify the Record of the Subform. 5. Set the property RefreshOnactive to yes on the Subform and Mainform.

Share Story :

Files restore feature in OneDrive for Business

Introduction: Restore feature has been added to OneDrive for Business, this feature allows to restore files any time during the last 30 days. So, users will be able to use this feature and restore file to a specific period of time. Restoring file: Sign in to your OneDrive for Business using work account credentials. Choose Settings. Then choose “Restore your OneDrive”. Select a Date, you can select either ‘One week ago’, ‘Three weeks ago’ or you can also select a custom date and time. So, in this case I am choosing custom date and time. Also choose the period of days and files you need to restore. After choosing the files click on ‘Restore’. Click on Restore on the confirmation pop up. Once the files are restored click on ‘Return to my OneDrive’ and you will be able to see your restores files. Conclusion: This is a great and very much wanted feature has been added in OneDrive for Business that will save a lot of efforts and users will be no more worried about OneDrive data.

Share Story :

IT and Business Systems for a Small and Medium Business in India

Posted On April 30, 2018 by Anil Shah Posted in

In this article, we highlight the key cloud-based IT and business systems that a Small and Medium Enterprise in India could use to improve efficiency while keeping costs low. These are also systems that we use to run our day to day operations. 1. Office 365 Business Premium – Email, Microsoft Office, Document Management, Security and Microsoft Teams. 2. QuickBooks Online Accounting Platform 3. PayBooks – India Payroll with integration to QuickBooks Online and optional biometric attendance integration. 4. Zoho Recruit – Recruitment Platform 5. Zoho People – HR Management Platform 6. Exotel – Cloud EPBAX business phone system 7. QuickHeal firewall for our network. Additional systems (once you grow to a certain size and need more processes and reporting. We use all of the below systems)– 1. Microsoft Dynamics 365 – Dynamics 365 Sales with lead integration with your website (typically WordPress). Dynamics 365 for Customer Support. Dynamics 365 Customer Support Portal for customer self service. Dynamics 365 Project Service Automation for Project Management. MailChimp for Marketing Automation or ClickDimensions. 2. PowerBI Analytics Platform. 3. GoToMeeting and GoToWebinar for Meetings and Webinars. Connect with us!

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange