Our support engineers have assembled the top recommended solutions for you.
Microsoft Dynamics AX 2012CRM Connector in Microsoft Dynamics AX 2012Financials Management in Microsoft Dynamics AX 2012Upgrading to Microsoft Dynamics AX 2012
Microsoft Dynamics AX 2009
Application Object Server (AOS)
Enterprise Portal and Role Centers
Inventory Costing in Microsoft Dynamics AX 2009
Invoice Settlements/Discounts/Reversals
SSRS and SSAS Integration
Workflow
I am trying to use a Insert Method on a table to default the values on two fields. The form is already linked to a productId, I am trying to use the productId to pickup the two fields that I need, but i cant find any code to use for this online. Anyone Can Help. The Table im Trying to use is RetailInventTable and pass the information in the EcoResProductVariantPerCompany Form. Thanks
What is the datasource for the Released SKUs form? (Sorry, no access to 2012 currently). If the datasource is a different table then RetainInventTable, you should write code in the forms datasource table to initialize the field based upon the RetainInventTable information.Pseudo code:insert() //this is on whatever table is the forms (released SKUs) datasource{ RetailInventTable retailInventTable; ; select retailInventTable where retailInventTable.ProductId == this.ProductId; //we now have the retailInventTable information this.SomeField = retailInventTable.SomeField; this.SomeField2 = retailInventTable.SomeField2;}The insert() method will be called when you save a record in your form. So you won't see this.SomeField initalized until after you save the record. If you want to see the record right away when you open the form, override the initValue() method on the table (code would be the same)
Does the productID field exist in the table where you want to default the fields? If not, you will have to perform a lookup on the table where the productID field is and use that as criteria. If it does, should be easy, just use if(this.productID){ do something }
The Table RetailInventTable has all the fields i am using. When I create the product; with the two fields, it get saved in the RetailInventTable. Then when I open the Released SKUs tab I want to the fields that are now associated with the ProductId to default on the two identical control. Im figuring I can use an INSERT in the RetailInventTable to send the data to the form or have a INIT on the button that will look automatically for the information. My problem is trying to see what the syntax of the code looks like. Im still relatively new to AX developement and cant find references of this kind of code that does from tables to Forms.
AX 2012? I am not quite clear on this part "ProductId to default on the two identical control"If you have a table that you want to initialize some fields based upon other fields then what you need to do is following:insert() { ; this.SomeField = this.SomeOtherField;}
Yeah this is all being done in AX 2012, I have a ProductId associated with new Product Master created. When i created that Product Master there is a record that is created and stored in the RetailInventTable; in this table are other fields that are associated with the products Booleans, time stamps etc. Two of those fields that are create I need to use again that will default onto a Form --> Released SKUs. When you open this form, it recognizes the ProductId, what i need is when it recognizes the productID to also see the two other fields that have been created previously and stored in the table RetailInventTable and have their Values default into two controls on the field.
Could I use the Insert method above to insert directly into a Form?
Great thank you!!