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,


[Updated on Jan 27, 2020
I got one feedback about Odata action on entity extension are not supported. It worked for me for one odd case, I yet to test myself if its not working now. I would request all readers to take necessary caution while trying below code. Thanks to Ashish for sharing his feedback.]


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. 

[Updated May 18, 2020]

 If you want to return any value use this syntax

 [SysODataActionAttribute("<MethodName>", false), SysODataCollectionAttribute("return", Types::Record, "CarColor")]

         public static void <methodName>(<parameters(optional)>)

        {

         }


Check below link for more details on Odata


Related topics:

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