D365 Business Central Archives - Page 12 of 33 - - Page 12

Category Archives: D365 Business Central

Restart Feature in Business central

Introduction: Administrators may need to restart a specific Business Central environment to resume normal operation in some cases as a troubleshooting step. Steps to achieve the goal: Go to your settings and select Admin Center. 4. Then click on Restart Environment Action.

Share Story :

How to Cancel Posted Purchase Credit Memo in Business Central?

Introduction: There might be a need where user wants to cancel the Posted Purchase Credit Memo which was posted by mistakenly. Ideally we cannot cancel the Posted Purchase Credit Memo if it is generated from Posted Credit Memo or Purchase return Order. But if the Posted Purchase Credit Memo is generated from cancel Posted Purchase Invoice . Steps to achieve the goal: If a Posted Purchase Invoice is cancelled then system post the Purchase Credit Memo and cancelled field is set to true in Posted Purchase Invoice. Go to its corresponding Posted Purchase Credit Memo you would be able to cancel action in the Posted Purchase Credit Memo. Cancel action Visibility code added by Microsoft. Conclusion: Thus we saw how we can cancel Posted Purchase Credit Memo in Business central. Thank you very much for reading my work. Hope you enjoyed the article!

Share Story :

Using Scheduled Jobs to Update POS Search Buffer

Introduction: POS Search Buffer is used to display the Items in the main POS Search Drop Down. The configuration for automatically updating the POS Search Buffer is located in the POS Functionality Profile, but it is limited in nature, only 2 options exist on the POS Functionality Profile, one which defines whether the buffer should be updated automatically and the other defines the frequency in which it should be updated. We’ve faced some issues with this process running automatically such the Buffer not being updated as such we had to look for a work-around using Scheduled Jobs. Pre-requisites: LS Central Business Central OnPrem or OnCloud References: How to: Control When to Update Search Index and POS Buffer (lsretail.com) Configuration: Create a new scheduled job with an appropriate name and description. In the Object Setup, define the “Object Type” as Codeunit and “Object ID” as 10000749, set the “Code” field as INDEX. Also ensure that the “Uses Scheduler Job Record” is set to true. In the Schedule Details configure the frequency in which you want to run the job. In the below screenshot the job is defined to run Every 10 seconds from 27-01-2022 starting from 10:14:00. Click on Run Now to test whether the job is working as expected. Conclusion: Thus we saw how we can use Scheduled Jobs to update the POS Search Buffer in the event that the standard automatic updating of POS Search Buffer isn’t working as expected. Happy Coding! Extra: The reason we set the “Code” to INDEX and “Uses Scheduler Job Record” is set to true is because in the Source Code of the Codeunit that we are trying to run we can see that the TableNo is defined as Scheduler Job Header which is a reference to the “Uses Scheduler Job Record” field and we can see that it uses the “Code” field to compare which action is to be performed. For instance if instead of INDEX we set it to UPDATE then the processing of the POS Search Buffer would happen based on Actions instead of all the records being re-index as happens when we set the “Code” to “INDEX”, we can also see that we can specify which table we want to Index by setting the table name in the “Text” field. 

Share Story :

Using Task Scheduler in Business Central

Introduction: In Business Central, we can use Task Scheduler to utilize background processing to ensure that Users do not have to wait for completion of long operations. Task Scheduler provides us an easy to use and monitor way to offload tasks from the main thread. It creates separate sessions for processing and it allows creating multiple sessions which can be used to run tasks in parallel. It also allows us to define the company in which the processing will happening which is useful when we have to perform operations across all available companies, for example initialization of certain fields or creation of certain records on extension installation. Pre-requisites: Business Central OnCloud or OnPremise References: TaskScheduler Data Type – Business Central | Microsoft Docs Task Scheduler – Business Central | Microsoft Docs Configuration: The following procedures are available for the Task Scheduler data type: CanCreateTask() – Checks whether it is possible to create a new task in this session. CreateTask() – Creates a new task with the specified codeunit, we also specify which Codeunit to run if the main codeunit fails, whether the starts of this task would be Ready when it is created, the company this task will be running under and the time after which this task is to be run. TaskExists() – Checks whether the specified Task exists or not. SetTaskReady() – Sets the specified task status to Ready, a Task can only begin processing if it is in Ready state. CancelTask() – Sets the specified Task’s status to Cancel. A Task can only be set to cancel if it is in pending state. A task that is in progress cannot be cancelled. In case the main Codeunit hits an exception then there are two cases: The exception is retriable :- Business Central will re-try the main codeunit a specific number of times with a specific time interval, if it is unable to complete then the task is failed. The exception is not retriable :- The task fails and the session is deleted. Further if there is a failure codeunit defined then Business Central will run the Failure codeunit instead of failing the task and similarly if the Failure Codeunit hits an exception that is it unable to handle then there are same two cases: The exception is retriable :- Business Central will re-try the main codeunit a specific number of times with a specific time interval, if it is unable to complete then the task is failed. The exception is not retriable :- The task fails and the session is deleted. I have created an action which creates a simple task for all the companies available to the User. After that action is called, we can see that there are four separate sessions created with the same codeunit for different companies. The below is the screenshot of the page – Scheduled Tasks Conclusion: Thus we saw how to create and use Scheduled Tasks in Business Central for background processing. Business Central OnPremise requires some configuration before Task Scheduler can be used you can refer to the below link for the same.Microsoft Dynamics 365 Business Central Server Configuration – Business Central | Microsoft Docs

Share Story :

How to Merge Duplicate Customer Data in D365 Business Central

 Scenario: A Business Central User receives a Sales order, the user then created a new customer and linked the new contact to it. The user Created a Sales Order and Posted it. Later found out that the user has created a duplicate customer. The new contact should be linked to Original customer. Steps: How to Merge Duplicate Customer Data. 1. In the Customer list below, the Original Customer no. 5000 has higher balance then the duplicate customer no. C00010 . The correct Contact, Mr Jim Halpert is set for duplicate Customer. 2. Now to Merge the duplicate Customer no. C00010 to Original Customer no. 5000, Open the Original Customer card and click on ‘Actions – Function – Merge with’ 3.The Merge duplicate page will open up, in the Merge with Field, enter the duplicate Customer no. In the fields FastTab, we can override the field value. In this case, check the Override box for contact as it needs to be linked to the original Customer. After updating the fields, now we can hit the Merge button on upper left corner. 4. A message will pop up, warning the user that the merging cannot be undone. The duplicate customer will be deleted permanently and data will be combined with original customer. 5. Now if we go back to Customer List, the duplicate Customer is deleted. The balance of Original customer has Increased. The relevant posted sales shipment and Posted sales Invoices are updated with duplicate customer’s data. 

Share Story :

Fields in Customer and Vendor Posting Groups in D365 Business Central

CUSTOMER POSTING GROUPS Customer Posting Groups determines the account receivables account.  1. In the search option, enter Customer Posting Groups and then choose related link. 2. In the Code Field, type unique identifier. 3. In the description field, type description of Customer posting group. 4. In each relevant account field, enter the G/L account  that will post the transaction accordingly. Receivable Account: This is a summary account where all the entries from customers will end up in balance sheet. Service Charge Account: This is a fee account where any fee you Charge to the customer when invoicing will end up here. Payment Discount Dr. Account: This account represents cash discounts given to the customers, then the sum representing the difference in original amount and what they’ve actually paid. This will be in debit field. Payment Discount Cr. Account: This account represents cash discounts given to the customers, then the sum representing the difference in original amount and what they’ve actually paid. This will be in credit field. Interest Account: It is an account to which, if you issue reminders or finance charge memos with interest on them, this interest revenue will be posted to this account. Additional Fee Account: This is where the reminder fees and finance charge momos will be posted when they are issued. Add. Fee per line Account: This is where reminder account will be posted if you have a reminder amount on each line of your remainders. Invoice rounding Account: This is where invoice rounding will be posted. Debit Curr. Appln. Rndg. Acc/ Credit Curr. Appln. Rndg. Acc: Both accounts are same except one is Dr and other is Cr. This account is particularly used when you are applying an entry on your customers from different currencies. E.g. Invoice is in USD but payment is in EUROS, in this case rounding difference will be posted to this account. Debit Rounding Account/ Credit Rounding Account: This is same as above mention field except the difference is of same currency and needed a slight adjustment. These accounts will therefore be used to Debit or Credit respectively.  Payment tolerance Debit account/ Payment tolerance Credit account:  These accounts are used to have a payment tolerance towards customers. e.g. If the customers is Invoiced USD 105 but customer pays only USD 100, and you have set a tolerance for 5USD which means the difference will be posted to these two accounts.  Assign Customer Posting Groups to Customers 1. In the search option, enter Customers and then choose related link. 2. Open a Customer Card. 3. Expand Invoicing Tab, in Customer posting group field enter relevant details. VENDOR POSTING GROUPS Vendor Posting Groups determines the account payable account. 1. In the search option, enter Vendor Posting Groups and then choose related link. 2. In the Code Field, type unique identifier. 3. In the description field, type description of Vendor posting group. 4. In each relevant account field, enter the G/L account  that will post the transaction accordingly, Payables Account: This is a summary account where all the transaction from vendors will end up in balance sheet. Service Charge Account: This is a account where you can put any service charge that might come from the vendor. Payment Discount Dr. Account: If you pay your vendor ahead to time and get a cash discount, a debit entry will end up in this account. Payment Discount Cr. Account: This account represents cash discounts given to the customers, then the sum representing the difference in original amount and what they’ve actually paid. This will be in credit field. Invoice Rounding Account: This account is used when an invoice from the vendor has to be rounded. Debit Curr. Appln. Rndg. Acc/ Credit Curr. Appln. Rndg. Acc: This account is used when the different Currencies have to be applied to each other and rounding has to be carried out. Debit Rounding Account/ Credit Rounding Account: This is used when you settle the outstanding amount in same currency but a little rounding off is to be done. Payment tolerance Debit account/ Payment tolerance Credit account: These accounts are used to have a payment tolerance towards vendors. Assign Vendor Posting Groups to Vendors 1. In the search option, enter Vendors and then choose related link. 2. Open a Vendor Card. 3. Expand Invoicing Tab, in Vendor posting group field enter relevant details.

Share Story :

Using OdataKeyFields for fetching records in Business Central Web Services

Introduction: Business Central provides us with Web Services which we can use for CRUD operations on specific tables. However it also provides us with different methods of accessing specific records for CRUD operations. Pre-requisites: Business Central On-Premise or OnCloud. References: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-odatakeyfields-property Usage: In Business Central, if we do not specify the ODataKeyFields as a property on the Page that we’ll be using as Web Service, then by default we have to use the Primary Key. However if we specify the “ODataKeyFields” in the page, we can use the field we have specified as the key for pulling the record in Web Services. While there are no limitations on which field can be used as key field, keep in mind that Business Central fetches the first record matching that field. For instance if you use the “Buy-from Vendor No.” as the ODataKeyField, then the Web Service will fetch the first matching record sorted by the Primary Key. Standard Business Central APIs use the “SystemId” field as the ODataKey field. You can also use multiple Keys in ODataKeyFields and use them for fetching records. Conclusion: Thus, we saw how we can use ODataKeyFields property for fetching records and performing CRUD operations. As a side note, you can also use multiple keys in ODataKeyFields.

Share Story :

Adding Edit in Excel for List Parts or Custom Pages

Introduction: Business Central provides us an easy method of modifying our data from within Excel using Web Services commonly found in the Edit in Excel action. This can be seen in the commonly used List Pages for example Payment Terms. However this functionality can be missing for certain pages or you might want to have additional logic or filtering before executing this. For this I’ll be demonstrating how to add the “Edit in Excel” action in Business Central pages. References: Viewing and Editing in Excel From Business Central – Business Central | Microsoft Docs Using Filter Expressions in OData URIs – Dynamics NAV | Microsoft Docs Configuration: In the above piece of code, I’ve added the “Edit in Excel” action onto the Blanket Sales Order SubForm to allow for easily adding lines using Excel. Firstly, we define the filters that we will be using on the page that we will be passing in the “EditWorksheetInExcel” procedure of the “OdataUtility” codeunit. Note that these filters are defined as Odata expressions as the “Edit in Excel” functionality uses Excel behind the scenes. In the next lines, we see that we pass the Page Caption, the page ID and the filters to be set on the page. Under the hood, the procedure creates a Published Web Service using the provided Page ID and uses that for the data manipulation. We had to prepend the additional “00000” as the procedure has been hardcoded to use “COPYSTR(“00000″ + {PageID}, 5)” meaning it starts reading after the 5th character. Conclusion: Thus we saw how to configure Edit in Excel for pages that do not have built in Excel functionality. Also note that Microsoft is expanding the Excel functionality to List Parts from Business Central v19 Wave 2, you can read more about it here.

Share Story :

Enabling Change Log in Business Central

Introduction: Business Central provides us with Change Log which helps us in keeping track of the changes made to a particular field in a particular table. References: Auditing changes – Business Central | Microsoft Docs Configuration: Search for Change Log in Business Central.  Select the tables you want to enable the change log for.  You can set the change log for a particular set of fields or for all the fields in the table.Click on the three dots next to the “Some Fields” and select  the fields you want to audit. Set Change Log Activated to true.  Conclusion: Thus we saw how we can configure Change Log for auditing and tracking changes in Business Central.

Share Story :

Recurring Sales in Business Central

Introduction: In this blog, we’ll be looking at how to reduce manual work in creating Sales Line in Business Central. For this, we’ll be using the Out of the Box feature of “Recurring Sales Lines” References: Standard Recurring Sales and Purchase Lines – Business Central | Microsoft Docs Configuration: Search for Recurring Sales Lines in Business Central global search and then click on New. Enter a Code for Identification, a short description and the Currency Code, if applicable. In the Lines, enter the Sales Line which are to be re-created. You can also define a Quantity if you want, it can be easily over-written if necessary. Go to the Customer Card for whom the Recurring Sales Line we created is going to be applicable. Then Go to Related > Sales > Recurring Sales Lines. Set the Code of the Recurring Sales Line, we just created and set the Valid From and Valid to Dates. The Insert Rec. Lines have the following options: Manual – System allows you to add the lines as and when required. Using the “Get Recurring Sales Lines” action. Automatic – System adds the recurring lines automatically whenever the Document is created. Always Ask – System shows a notification above which allows you to fetch the Recurring Lines in one click. Conclusion: Thus, we saw how to configure Recurring Sales Lines in Business Central which is a very useful tool in reducing manual work.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange