Hello.
What is the equivalent to IntPtr in AX Dynamics code (2009)?
Also - Convert IntPtr to HWND and vice versa.
(I need to call a dll in C#, which gets a IntPtr parameter).
Thanks :)
Hello.
What is the equivalent to IntPtr in AX Dynamics code (2009)?
Also - Convert IntPtr to HWND and vice versa.
(I need to call a dll in C#, which gets a IntPtr parameter).
Thanks :)
Hi,
The following code gives me the error '_custAccount' argument is incompatible with the required type.
public boolean modified()
{
boolean ret;
ret = super();
CustTable.PdsCustRebateGroupId =CustTable::find(CustTable.AccountNum).PdsCustRebateGroupId;
//CustPaymModeTable.PaymMode =CustPaymModeTable::find(CustPaymModeTable.).PaymMode;
CustTable.Blocked =CustTable::find(CustTable.AccountNum).Blocked;
CustTable.PdsCustRebateGroupId =CustTable::find(CustTable.AccountNum).PdsCustRebateGroupId;
CustTable.PaymSched =CustTable::find(CustTable.AccountNum).PaymSched;
CustTable.CreditMax =CustTable::find(CustTable.AccountNum).CreditMax;
CustTable.PriceGroup =CustTable::find(CustTable.AccountNum).PriceGroup;
CustTable.PaymMode =CustTable::find(str(this.AccountNum)).PaymMode;
return ret;
}
Please, help me.
Thank You.
Hi,
I have added a field in CustParameters, and when I create a new Customer, if my field is checked, I should not make the control for VatNum Field.
if (mandatoryVATNum == TaxVATNumCountryRegionType::None || (logisticsPostalAddress.CountryRegionId == #isoBE && SysCountryRegionCode::isLegalEntityInCountryRegion([#isoBE]))) { return; } if (mandatoryVATNum == TaxVATNumCountryRegionType::EU) { if (IntrastatCountryRegionParameters::isInEU(LogisticsPostalAddress.CountryRegionId)) { throw warning("@SYS54494"); } } if (mandatoryVATNum == TaxVATNumCountryRegionType::DomesticEU) { if (IntrastatCountryRegionParameters::isInEU(LogisticsPostalAddress.CountryRegionId) || IntrastatCountryRegionParameters::isDomestic(LogisticsPostalAddress.CountryRegionId)) { throw warning("@SYS54494"); }
The controls above should not happen in case the checkbox is set to yes. I am not really findin a solution how to solve the case with Post or Pre Events. Do I have any solution in this case?
Hi everybody.
I'm trying to create a simple lookup in a field of a datasource in a form.
The tables and related forms are BankAccountTable.
1.- Added new field BullCust (extends EDT CustAccount) and field group to new extension BankAccountTable.MyExtension.
2.- Created new form extension BankAccountTable.MyExtension and added new group to form.
This works OK. But now I want a simpler lookup. In Ax2012, I would override BankAccountTable\Datasources\BankAccountTable\BullCust\Lookup method, with something like this:
public void lookup(FormControl _formControl, str _filterStr) { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; SysTableLookup sysTableLookup; sysTableLookup = SysTableLookup::newParameters(tableNum(CustTable), _formControl); queryBuildDataSource = query.addDataSource(tableNum(CustTable)); sysTableLookup.addLookupField(fieldNum(CustTable, AccountNum)); sysTableLookup.addLookupField(fieldNum(CustTable, Party)); sysTableLookup.addLookupField(fieldNum(CustTable, RecId)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); }
In Ax7 this doesn't work anymore. Tried this approach (based on https://ievgensaxblog.wordpress.com/2016/05/01/ax-7-how-to-override-form-data-source-field-methods-without-overlaying/):
3.- Created class that manages lookup:
public class BullFormBankAccountTable_Handler { public static BullFormBankAccountTable_Handler construct() { return new BullFormBankAccountTable_Handler(); } public void BankAccountTable_BullCust_OnLookup(FormDataObject _formDataObject, FormControl _formControl, str _filterStr) { Query query = new Query(); QueryBuildDataSource queryBuildDataSource; SysTableLookup sysTableLookup; sysTableLookup = SysTableLookup::newParameters(tableNum(CustTable), _formControl); queryBuildDataSource = query.addDataSource(tableNum(CustTable)); sysTableLookup.addLookupField(fieldNum(CustTable, AccountNum)); sysTableLookup.addLookupField(fieldNum(CustTable, Party)); sysTableLookup.addLookupField(fieldNum(CustTable, RecId)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); } }
4.- Created class extension that subscribes and links apropiated events:
[ExtensionOf(formStr(BankAccountTable))] final public class BullFormBankAccountTable_Extension { [FormDataSourceEventHandler(formDataSourceStr(BankAccountTable, BankAccountTable), FormDataSourceEventType::Initialized)] public static void BankAccountTable_OnInitialized(FormDataSource _sender, FormDataSourceEventArgs _e) { var overrider = BullFormBankAccountTable_Handler::construct(); _sender.object(fieldNum(BankAccountTable, BullCust)).registerOverrideMethod(methodStr(FormDataObject, lookup), methodStr(BullFormBankAccountTable_Handler, BankAccountTable_BullCust_OnLookup), overrider); } }
And no result. I've debugged and BullFormBankAccountTable_Extension.BankAccountTable_OnInitialized() is properly called. But resulting lookup is the standard one, not the mine one.
Any ideas or example about how should this be performed?
(PS: version Ax7 Platform Update 9)
Hi,
I was tasked to remove a SalesInvoice report Overlay, which existed in a model that extended from ApplicatonSuite, and I copied the existing Design and created a report called SalesInvoice.Extension. Created a new extension menu, controller class, and event handler for managing the Print management to select the new report. This worked fine and performed a build over to the Test instance. Generated an error with the posting of the SalesInvoice and determined the controller class was not properly designed. Was also advised that I should move the objects from current model to the our custom model. I used the same naming conventions, and deleted all objects references from the old model. Then proceeded to check in all objects with in the new model. Delivered to TEST and noticed the reports still ran the previous version and the posting error still exists. Renamed all the reports and controller class and set everything properly, moved to TEST and now the report is working correctly. However, the controller class still behaves like the previous version, so the error message render during posting "Something went wrong while generating the report. Please try again." As I mention, if I select a record that has already been invoiced, the report runs fine with the new version. I have cleared USAGE DATA and of course stopped and started the services. Have a case open with MS support, but have not received any information as of yet. All my other changes completed and just waiting to clear this one issue up. Any suggestions?
Thanks
Bill
Hi guys. I was trying to extend the SalesEditLines form, but I ran into the following problem:
I have to extend the functionality of the reArrange method, but to do that, I need to access the current state of a class on the pre reArrange at the time of the call to the method, but because the pre event handler is static, I can't do that. I'll give an example:
[ExtensionOf(formStr(SalesEditLines))] final class SalesEditLinesEventHandlers_Extension { public someClass someClassInstance = someClass::construct(); [PreHandlerFor(formStr(SalesEditLines), formMethodStr(SalesEditLines, reArrange))] public static void SalesEditLines_Pre_reArrange(XppPrePostArgs args) { //in here I need to access someClassInstance current state } }
Is there any way to do that?
Hi,
I need to send sms from Dynamics AX 2012 with required response options (Yes or No).
If a person sends a request from dynamics ax , request moves to a mobile(Through SMS) with available options (Yes/No). Depending upon user response, response should be transmitted to Dynamics AX 2012.
for eg;
//User get the message like this:
"Do you want to approve the bill?"
1. Yes
2. No
Depending upon user input, data should be transmitted to dynamics ax.
How can we send request and get response to Dynamics AX??
Hello, we are trying to create a new customer using OData entity but it gives error while saving that "Field Customer Account must be filled in" as we want to generate customer number automatically from number sequence.
When the number sequence is set to manual, we can save the record by assigned the value to customer account. but what if we need to auto generate it?
Hello everyone,
We have requirement to send customer details to CRM while creation/updation in Operations. For the requirement we are using Account entity of CRM. We have added dlls of CRM in Console Application in visual studio and taken reference of that console application in our Operations project.
Here concern is when we will move elements of Operations to other environment through axpp files/ Deployable package that console class won't be included. So how to manage that class and reference in various environments? We can move and give reference when Visual studio is available, is there any method to give reference directly from Operations project?
One more concern is Microsoft is going to handle production environment so how they will handle this particular thing because as per my understanding we have to provide them deployable package only. Can anyone suggest alternate approach for this kind of integration?
PS: Data entity can be used to consume data but I am very little aware about exposing data. If someone can provide link then it will be useful. I have tried to use data entity using this blog: http://axforum.info/forums/showthread.php?p=386514 but here its more about consuming data in Operations.
Regards,
Smit
Hi all,
Wondering if anyone have set up recurring file import jobs based on data package as a format (where there is multiple entites used as target). My questions concers naming of the files in the data package (in order to match the manifest).
When preparing previous data packages for one-time imports I have first created the DMF projected added entities needed and then downloaded the package where sample files (of the each entity), a package header file and a manifest file is generated for you. In the manifest file there is a reference to the sample filenames. For example if the Customer entity is used with an xml format there will be a Customers.xml file in downloaded package. When importing I have only suceed when naming the actual data files the same name as as the reference in the file (or edited the reference value in the manifest with the exact filename I m using, ie the same thing).
So now I am wondering how it will work for recurring jobs with data packages where the files will be date and time stamped i.e filename will be dynamic.
Thanks fo any input
Is there any new guidelines against using reflection methods in X++ in D365FO?
Or using reflection method only in any specific way or specific scenario.
hi
I am looking at a customized code in D365 and i am horrified because of break down in OOPS. for e.g. latest example that i saw was to extract financial dimension value and that code was written in a completely unrelated event handler.
What is your experience? Why not use class like for e.g. DimensionAttributeValueSetStorage.XXXHelper or even DimensionAttributeValueSetStorage.XXXExtension (so that the code can hold extension logic as well) which will allow reuse?
Please share your experience if you can.
regards
Hello experts,
I am a SQL DBA supporting a Dynamics AX 2012 R3 CU10 environment. SQL is of version 2014 enterprise edition running off windows server 2012 R2 standard edition.
We currently are in deliberations and discussions to move from on premise to Azure.
My question surrounds areas on how to achieve increased IOPS and throughput for the AX Business DB on SQL Server Azure VM. Our current environment has SSDs (NVMe INTEL SSDPEDMD02) and another set of disks on - DELL PERC H730P Mini SCSI Disk Device. Both have excellent IOPS and throughput numbers.
On Azure I am aware that we can implement Windows Storage Pools (on the SQL Server Azure VM) where you add as many physical disks, group them in virtual disks with Disk Striping and that can take you closer to your target IOPS/throughput and then carve out the desired volumes.
But is implementing table/index partitioning and/or configuring additional file groups and rearranging objects even possible (supported) by Dynamics AX. And is it worth the effort if Windows Storage Pool can assist with this.
If you can share any MS KBs or Whitepapers related to these questions it will be highly appreciated.
thank you for time.
Niraj Mehta
I am trying to build functionality for users to be able to search for labels. First I tried to extend the system functionality of Dynamics 365 For Operations by combining missing functionality in Dynamics 365 For Operations with code that exists in AX 2012 SysLabelEdit. The core functionality that I wanted to use always gave me empty string back even though the same code works in AX 2012.
After that I tried TreeNode functionality and it only works on some other parts of the AOT like tables in Dynamics 365 For Operations. I tested the code on AX 2012 and there was no problem retrieving the label prefixes.
With Metadata API of Dyamics 365 For Operations I can retrieve all languages of labels and I can also look into a LabelFile if I know what name to look for. Also I can check if the name for a LabelFile is valid. I tried creating a Label inside the metadata namespace and iterate over the available LabelFiles. But it seems like the functionality is not implemented. I tried getFirstLabelFile and getNextLabelFile after creating a new Label but I can't retrieve anything more than empty values. Could someone tell me how to enumerate label prefix for label search functionality? I am currently using AX'7 update 3.
Hello everyone,
I have office 365 with several licenses of dynamics 365 enterprise and I would like to know how I can remove the test instance. I have disabled the demo data from admin but many records still appear.
How can I restart a blank instance?
Thank you
Is there any information when the TechCon 2017 in Seattle will be?
Hi,
We are planning to deploy Dynamics 365 Plan 1 Enterprise Edition Cloud version via Office 365 and would like to know if we require CAL license for Dynamics 365 (Cloud).
Thanks,
Mitesh
Can I get Dynamics 365 for Operations on-premises, Enterprise edition from Partner source link ?
I am new to D365. I did some searches and found few ideas on how to connect to D365 via the SDK.
From my Desktop Access (2007) I can connect to my remote SQL Server via ODBC.
But I would like to know if its possible to connect to my remote D365 database from within Ms Access (or Excel) using ODBC or native SQL driver.
I suspect this is possible but have been unable to find the syntax of the connection string for the DSN.
In other words; where is my D365 SQL Server db located?