| Santosh's profileDynamics AxPhotosBlogLists | Help |
|
July 01 Error: Cannot execute a data definition language command on ().Hi All, I would like to share a job which i found in a technical forum. Most of us would have ran into issue "SQL database error" when data is loaded in Dynamics AX. In order to fix it please run through the job found in the attached link. http://axforum.info/forums/showthread.php?t=16251&highlight=execute+data+definition+language+command.
Happy dAxInG................ June 18 Configuration Key Status Using X++ CodeAs we are aware, Configuration key controls access to specific feature. To know about the status of a configuration key, the user has to traverse Administration->Setup->System-> Configuration. Instead with the following job, a user can know the status of all the configuration keys that is being used in the system.
//Configuration key names and their enable state. static void ConfigurationKey(Args _args) { ConfigurationKeySet configKeySet; DictConfigurationKey dictConfigKey; Object formRun ; Map mapConfigKey; str strOutput; int i; ;
mapConfigKey = new Map(Types::Integer, Types::String); configKeySet = new ConfigurationKeySet(); configKeySet.loadSystemSetup();
for (i=1; i <= configKeySet.cnt(); i++) { dictConfigKey = new DictConfigurationKey(configKeySet.cnt2Id(i)); strOutput = dictConfigKey.enabled() ? "enabled:" : "disabled:"; strOutput += " " + " " + dictConfigKey.name(); mapConfigKey.insert(i, stroutput); }
_args = new Args(formstr(SysPick)); _args.parmObject(mapConfigKey);
formRun = classfactory.formRunClass(_args); formRun.init(); formRun.run();
formRun.setCaption('ConfigurationKey Status'); formRun.wait(); }
On executing this job, the output will be displayed in a SysPick form June 15 Validating TabPage Fields DynamicallyThis article is to my lovable sweetheart AnithaSantosh. I would like to share a small piece of information on validation stuff at form level. The requirement is something like doing basic validation. All fields at the form level needs to be filled in; else it needs to update the user that the specific fields’ information is missing. All the field validation is basically done at the table validate Field method. If the form design is changed time to time then the code also needs to be updated which isn’t a good practice. I took a small example to showcase how we can achieve the requirement. I have custTable form which maintains customer details and payment is important information which is required when we make any sales order. If the basic payment information is not filled in while creating customer details then system has to update the user that all details under payment tab needs to mandatorily filled in. 1) Set Auto declaration to ‘Yes’ for payment Tab under custTable form design
2) Under validateWrite of the custTable datasource add the following logic. for (i=1; i<= payment.controlCount (); i++) { if (payment.controlNum (i).valueStr () == '') { warning (strfmt ("%1, %2, %3", i, strdel (payment.controlNum (i).name (), 0, 8), 'Mandatory to be filled in.')); } } So basically before the Cust details are saved it checks whether all fields under payment Tab is filled else it will throw warning will the furnished details.
Note: No. indicates fieldNum This is just a basic information which i felt would be useful tip May 25 Inside Microsoft Dynamics AX 2009 - Released
A big Thanks to MFP and Arjit for their contribution on the release of latest edition on "Inside Microsoft Dynamics AX 2009". To Download Code Samples: http://www.microsoft.com/learning/en/us/book.aspx?ID=13345&locale=en-us#tab2 Happy DAx Learning................................. May 22 SalesTaxGroup Defaulting Issue in AIF 2009I have seen a strange behaviour in AX 2009. While processing vendor records via AIF the corresponding sales tax group doesn't default in the vendor master. VendGroup master table has default tax group setup done as shown When “Vend Group” is passed via Xml accordingly the related fields needs to get defaulted. Screenshot on the same is shown.
Reason: There is no defaulting logic implemented in the setTaxGroup () method in the AxVendTable class. Solution: The setTaxGroup () method needs to implemented with the following logic after isMethodExecuted called. The setTaxGroup () method needs to implemented with the following logic after isMethodExecuted called. //Checks if VendGroup is provided in Xml. //If no VendGroup then it throws error stating mandatory field missing. this.setVendGroupFields ();
//Checks if <VendGroup> field is set in the Xml //And check if the vendor group master has TaxGroupId defined for it. If (this.isFieldSet (fieldnum (VendTable, VendGroup)) && this.vendGroupRecord ().TaxGroupId) { this.parmTaxGroup (this.vendGroupRecord ().TaxGroupId); }
With the following piece of code the sales tax group will be defaulted in the vendor master details. Even Customer master has similar issue and i assume Microsoft would either release a hot fix for AX2009/resolve the bug in vNext |
||||
|
|