How to write COC for different elements syntax

When extending a class, use classStr(<NameofBaseClass>) When extending a table, use tableStr(<NameOfBaseTable>) In the case of a form, use formStr(<NameOfBaseForm>) When extending a form Datasource use formDataSourceStr(<NameOfBaseForm>,<NameOfDataSource>) When extending a form Data field, use formDataFieldStr(<NameOfBaseForm>,<NameOfDataSource>,<NameOfField>) For a form control, use formControlStr(<NameOfBaseForm>,<NameOfControl>) When extending a data entity, use tableStr(<NameOfBaseDataEntity>) Two know more about COC follow this blog Chain Of Command For Form DataSource – Dynamics […]

How to get the number sequence for customer in D365FO

custTable.AccountNum = smmParameters::getNumber(smmNumbSeqUsed::Customer); This code basically does the job. note if we pass different enum to this getNumber method we can get number sequence for Prospects, Party, Leads etc. Useful method to retrieve all configured numbersequence using one parameter.

How to create a Custom Business event for Worker created event in D365 F&O using X++

Please find the sample data contract class which extend BusinessEventContract [DataContract]class DevWorkerCreatedContract extends BusinessEventsContract{private HcmPersonnelNumberId PersonnelNumber; Please find the sample Business Event class extends BusinessEventsBase [BusinessEvents(classStr(DevWorkerCreatedContract),“Worker Created Event”,”DevWorkerCreatedEvent”,ModuleAxapta::HumanResource)]public final class DevWorkerCreatedBusinessEvent extends BusinessEventsBase{private HcmWorker hcmWorker;private DirPersonName dirPersonName; Please find the place where we need to call the business event on eventhandler for HcmWorker public static […]

How to Run a Class in D365 F&O using URL

Hi All, I have recently had a requirement to run a simple job or class through URL. In Dynamics 365 Once you created a class similar to creating Batch job in Ax 2012. We can directly Run the class using URL. https://<D365URL&gt; /?cmp=<YourCompanyName>&mi=SysClassRunner&cls=<YourRunnableClassName> Please find link below which shows how its done. https://community.dynamics.com/365/financeandoperations/b/365operationswithsukrut/archive/2017/10/19/running-runnable-class-through-url-in-dynamics-365-for-operations This is […]