Posts

Add a check digit on generating number sequence through code x++ in d365F&O

 Hi Viewers, We a check digit on generating  number sequence through code x++. Check digit is a digit added as last digit to avoid wrongly entered by user. This didgit is summation of all the digits in the generated number. X++ code as follows.  public static str addCheckDigit(str _numberSeqNum)  {      return strFmt("%1%2", _numberSeqNum, modulo10(_numberSeqNum));  }  

How to load number sequence automatically on sandbox/trier-2/production environment along with package deployment.

 Hi Viewers, We can load number sequence automatically on sandbox/trier-2/production  environment along with package deployment. without using runnable class or custom script. We can use delegate method in  NumberSequenceModuleSetup class to load custom number sequence as shown below.    [SubscribesTo(classStr(NumberSequenceModuleSetup), delegateStr(NumberSequenceModuleSetup, numberSequenceModuleSetupLoadData))]   public static void NumberSequenceModuleSetup_numberSequenceModuleSetupLoadData()   {       FinTagGroupingNumberSeq     finTagGroupingNumberSeq  = new FinTagGroupingNumberSeq();       finTagGroupingNumberSeq .load();   }

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