Posts

Get customer from dynamic accounts ledger dimensions.

Image
 Hi Viewers, To get customer record from custTable from ledger dimension we can use standard method as below.

Business Event in D365F&O

Image
 Business Events Business events provide a mechanism that lets external systems receive notifications from finance and operations apps. By using this mechanism, you can perform business actions in response to the business events. Business events occur when a business process runs. During a business process, users who participate in it perform business actions to complete the tasks that make up the business process. A business action that a user performs can be either a workflow action or a nonworkflow action. Approval of a purchase requisition is an example of a workflow action, whereas confirmation of a purchase order is an example of a nonworkflow action. Both types of actions can generate business events that external systems can use in integration and notification scenarios. Prerequisites You can consume business events by using Microsoft Power Automate and Azure messaging services. Therefore, you must bring your subscriptions to these assets to use business events. We need end...

Convert contract class object to Json format through x++ in D365 F&O.

Image
 Hi Viewers, We can convert Convert contract class object to Json format through x++ in D365 F&O. By using JsonSerializerExtension class. Ex:  Str jsonString =         JsonSerializerExtension::serializeClass(requestContract);

Parameters in email template in D365F&O in x++

 Hi Viewers, in general email template will be in html file where format already design. In html template we the values like %PO%. on runtime this parameters will be replace by system values. public void generateEmail(purchID _purchID) {     sysemailsystemTable emailSystemTable;     sysEmailMessageSystemTable emailMessageSystemTable;   emailMessageSystemTable = sysEmailMessageSystemTable::find(emailID,  defaultLanguage); #define.PO('PO'); map templateTokens = new Map(Type::string, Type::String); templateTokens.insert(#PO, _purchID); }

How to add access in D365F&O

Image
 

Auto submit and Confirm purchase order in batch through code in X++ in D365F&O.

 Hi Viewers, Here is the code used for create new return order, auto submit workflow if any and confirm PO in batch. public void createAndConfirmReturnOrder(str _workOrderId)     {         PurchTable purchTable, returnPurchTable;         VersioningPurchaseOrder versioningPO;         purchTable = PurchTable::find(_workOrderId);         ttsbegin;         returnPurchTable.initValue(PurchaseType::ReturnItem);         returnPurchTable.initFromPurchTable(purchTable);         returnPurchTable.OrderAccount = purchTable.OrderAccount;         returnPurchTable.initFromVendTable();     ...

How to in visible a parameter in contract class in dialog form in x++ in D365F&O Sysoperation framwork

 Hi Viewers, To make parameter not visible in dialog form if it is populating from contract class. use attribute  SysOperationControlVisibilityAttribute. [DataMemberAttribute         ,  SysOperationControlVisibilityAttribute(false) ]     public NoYes parmRevalidate(NoYes _validate = validate)     {         validate = _validate;           return validate;     } Thanks for reading! Like this post if you found it helpful. 😀😀 And let me know your thoughts in the comments below.😇😇