microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
758 stars 603 forks source link

Workdate not correct #7371

Closed stijn9830 closed 4 years ago

stijn9830 commented 4 years ago

Hi, when creating a new company, for a reason I do not know, the field CompanyInfo.demo environment is set to yes. thats the reason why the workdate is nog correct, it will take the last posting date on g/l entries. I can not find how we can add the field on the page, without using a page extension. Even not with personalisation. I'm working on BC160 saas, so latest CU.

Thanks, Stijn

dzzzb commented 4 years ago

How did you create the new company? Just insert a record, or copying from an existing company? Do you mean the field Evaluation Company? I can't see any "demo environment".

stijn9830 commented 4 years ago

Sorry, i meant field 100 Demo Company On SAAS customers, I can not find this field on the page.

stijn9830 commented 4 years ago

When creating new company, You get a wizard on Saas environment, but can you manipulte this parameter afterwards? image

dzzzb commented 4 years ago

My bad, I was looking at system table Company, not 'normal' table Company Information. I grepped through on-prem source code and can't see anywhere that sets Demo Company. Mysterious...

stijn9830 commented 4 years ago

We should find where this boolean is set to TRUE. And we should be able to modify it afterwards. I don't know how this affects the workdate, but when this boolean is TRUE, then workdate is last posting date of G/L Entries

StanPesotskiy commented 4 years ago

There are 4 options when you create a new company: https://docs.microsoft.com/en-us/dynamics365/business-central/about-new-company#creating-a-new-company

  1. Evaluation - Sample Data

  2. Production - Setup Data Only

  3. Advanced Evaluation - Complete Sample Data

  4. Create New - No Data

The "Demo Company" field is set to false for Production and New. It is not supposed to be modified by users, because the evaluation companies are for demonstration only. But you can create an extension that would add this field to a page, where you can change it.

stijn9830 commented 4 years ago

Ok, Thanks. What if you made a mistake, and the company is already used by the customer, there is no way back, except making an extension?

StanPesotskiy commented 4 years ago

That is right. The evaluation company contains the demonstration data (customers, vendors, items, etc.) and it is not supposed to become a production company.