July 08, 2019

[Solved] Issue with default app in Windows 10, TWINUI bug

Known Bug in Windows 10,

Error:
All sudden all my default app have been changed to TWINUI and I am not even able to change it.

























Solution: 
Open Power shell as admin and run below command,
Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}






























That's it, now check the default apps again

























Also, you can Try below steps for Photo/Images
  1. Press Windows button + R.
  2. Type:%appdata%\..\Local\Packages\Microsoft.Windows.Photos_8wekyb3d8bbwe\LocalState
  3. Delete all the contents of that folder.
  4. Restart the computer and check if the issue persists.

Thanks





-Harry
Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

July 03, 2019

Working with Data entities in D365FO- Part II

Add new fields on DataEntities/Form from the user interface


Hi Folks,

In this post, I am going to share one new feature which comes with the latest update in #MSD365FO. Now you can add any custom field from the user interface, you don't need to add that in AOI, however, there are some limitation on this but having this option is good where user wants to add some fields on a form/entity which doesn't have any metadata dependency/Relation to other tables. Earlier this feature was limited to talent only now with recent version Microsoft bring this to Dynamics 365 FO as well.

For today’s post lets take an example customer group, You want to add a new field on customer group form. Let's call it ‘SPOC person’. Now to add a new field on a form, you need to personalize the form.
Open Customer group form, go Option menu, ‘select personalize this form’ option.

















It will give you another pop-up window, select ‘Add Field’ and grid in the form where you want to add a new field(s).



on the next screen, click on ‘Create new field’























When you click on ‘Create new field’ a new form will open (kind of designer form). First, choose the table where you want to add this field. Select Customer Group here.
























and fill other details as below, and hit the save button.

























The system will ask for another confirmation












now, this field available to add on the form,






















Once you insert this field, it will appear on the form,












Now go to  System Administrator > setup > custom field. Select table from the dropdown list. In the entity tab, select data entity where you want to add this new field. The system will show all the entity where the CustGroup table used.



Now go to data management > Framework parameter >  Entity Setting and refresh entity list.

Go to Customer groups entity and click on modify target mapping. Here generate the mapping. On successful completion, your custom field must available in mapping.

















Here you go…. that all.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

June 26, 2019

QuickFix-4: Cheque SSRS report modification

Any cheque report needs more precision to put different fields in the right position to align with physical cheque stationary.

Open cheque SSRS report design and right click in the blank area of the report > View > Ruler.
This step will enable the ruler in your report so you can put fields in the right place in fewer tries.













-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

May 27, 2019

Working with Data entity in D365FO - Part I

Hi Folks,

In this post let’s see how to add custom and virtual fields on Data entities. This approach will work on both standard and custom entities. I will show you both scenarios. When adding new fields on a new entity, steps are very simple and all you need to add business logic in the respective data entity methods to work with the export and import process.

Custom field: When adding new fields in standard application entity like Customers (CustCustomerV3Entity), Vendors (VendVendorV2Entity), Customer groups(CustCustomerGroupEntity).

Virtual fields: Fields which doesn’t exist in a table but require to fetch any other table field. For example, assume we have purchase requisition records from another system which needs to import in Dynamics 365 FO. In source data, we have also had delivery address (string) which needs to insert into PurchReqLine table’s DeliveryPostalAddress(RefREcId) field. So we need to add a virtual field name as DeliveryAddress(string) and in code need to take this string values and create address at run time, use generated rec id to pass in PruchReqLine table. 


In part one post, let’s see how to add new fields(table fields) on standard data entity’s extension. Here is the scenario, the client wants me to add new fields in the vendor group, to capture a unique reference number from their another system. Let's call it ‘SAPVendGroup’.  
1.       Create an extension of table VendGroup, and add a new string field name it SAPVendGroup.



















You need to build/DB synch to get these fields in reference objects.
2.       Create an extension of VendVendorGroup data entity and drag and drop a new field from Data source to Entity fields.



















3.       Create an extension of VendVendorGroupStaging table, add new field here as well.
4.       Build your solution and DB synch.

5.       Now try to export and import.

In the next post, we will see how virtual fields work with data entities. 

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

May 18, 2019

QuickFix-3: Runtime functions in Dynamics 365 FO

curExt(): The extension for the current company

curUserId(): current user id.

funcName(): The name of the method that is executing this method

getCurrentPartition():The short name of the current partition (max 8 char).

getCurrentPartitionRecId():The RecId field of the current data partition

getPrefix(): The current execution prefix.

sessionId():The numeric ID of the current session.


prmIsDefault(): 1 if the default value for the parameter was used; otherwise, 0.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

May 13, 2019

How to add 'Actions' on Odata entities


Hi Folks,

In this post, I'll show how to add a new action to D365FO Odata entities which you may want to access in Logic apps or Microsoft Flow. There could be two possible scenarios, either you have custom data entity where you can directly add a method or you have standard data entity for that you need to create extension class.  

First, let's see how to add on the custom entity (yes cause, it's straight forward 😉 ), 

Add your method on data entity and add below attribute
 [SysODataActionAttribute("<MethodName>", false)]
public static void <methodName>(<parameters(optional)>)
{
}

Save, Synch and Build your changes. This method should be available now on OData action in the Logic app or Flow. 

Now the other part, how to add the same in Data entity extension. Create a new class and add below attribute.

[ExtensionOf(tableStr(<data entity name>))]
final class <data entity name>_Extension
{
         [SysODataActionAttribute("<MethodName>", false)]
         public static void <methodName>(<parameters(optional)>)
        {
         }
}

Pl make sure you use '_Extension' keyword for above class, it's mandatory.

That's all for today. Try it and share your feedback. 

Related topics:

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta


May 01, 2019

'RunAs' method in Dynamics 365 FO

Hi Folks,

Most of us have used RunAs earlier and it has the same use in D365Fo as well. Sometimes we came across where we need to run a specific business operation under a different user account than the currently logged-in user. To achieve this we can use RunAs to execute a specific operation. This enables the caller to run an X++ method in the security context of another user. This function is most often used with batch processing or workflow submission for another user.

The syntax is really simple as below,

container runAs(
        str userId,
        int classId,
        str staticMethodName
        [,
        container params,
        str company,
        str language,
        str partition
        ])

Parameter
Description
userId
The user to impersonate.
classId
The class to invoke in the impersonated session.
staticMethodName
The class method to invoke in the new user context.
params
The parameters to pass to the method; optional. 
company
The company that is selected for the impersonated session; optional.
language
The language that is selected for the impersonated session; optional.
partition
The partition key of the type that is returned by the getCurrentPartitionfunction; optional.

Now, let's see how to implement it and take an example of submitting a PR for a different user.

I need to submit a Purchase requisition on behalf of the different user through X++ code. To get this done I need a few details all in a single container type parameter



Hope it will help.

Cheers!!!
-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

April 26, 2019

QuickFix-2: Export up to 1 million rows to Excel

The Export to Excel feature can now be configured to allow users to export up to 1 million rows from a grid in Finance and Operations, a substantial increase from the previous 10,000-row limit. By default, the export limit is set to 50,000 rows, but through the Client performance options page, system administrators can adjust the export limit as high as 1 million rows.

Check below link

https://docs.microsoft.com/en-us/business-applications-release-notes/october18/dynamics365-finance-operations/export-more-row

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

April 17, 2019

How to set new admin user post DB refresh

Hi Folks,

Many times we need to get actual data for our development and to get such data in your dev box you need to restore data from either UAT/QA/SIT or any environment which have such data.
Once you complete DB restore in your target system, here issues come, you don't have admin access or maybe SysUser access to this new DB.
Microsoft provides a script to update your email id as admin in your dev box. Follow the below steps to achieve this.

Step 1: Go your DEV box RDP.

Step 2: Go to below path K:\AosService\PackagesLocalDirectory\Bin (In most of the cases it will be same as mentioned if you didn’t found search for ‘PackagesLocalDirectory’ or ‘Packages’ shortcut in one of the drive.

Step 3: Open ‘AdminUserProvisioning’
















Step 4: Enter your email Id, which you want to give admin access to this environment and click on submit button.

















Step 5: Here you go.

















Cheers

Harry
Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

March 05, 2019

QuickFix-1: Delete transaction data in D365FO

To delete all transaction data in a D365 FO environment, use below browser URL. Replace the values with your details and open.

https://<Environment Link>/?mi=SysClassRunner&cls=SysDatabaseTransDelete&cmp=<LegalEntity>


-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

March 01, 2019

Give method name on a range of AOT Query instead of value

Hi Guys,

Here is a quick tip, how to add methods in an AOT query ranges instead of values. Refer standard query 'CaseListPages_MyOpenCases'


https://www.theaxapta.com/
https://www.theaxapta.com/












-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta