14 September 2010

Microsoft Dynamics AX Design Patterns

The Microsoft Dynamics AX design patterns listed below enable you to use existing code patterns
to resolve common design issues Click here

1. Instantiating Application Objects
2. Searching for Records
3. Searching for Multiple Occurrences
4. Parameter
5. static find Method
6. static exist Method
7. Pack-Unpack
8. Persistent Data Storage
9. Containers as Parameter Bags
10. Multi-selection
11. Partner Hooks
12. Use the Type System
13. Data Validation
14. Change Company
15. Storno
----

15.Change Company

static void main()
{
CustTable custTable;
;

// Assume that you are running in company 'aaa'.
changeCompany('bbb') // Default company is now 'bbb'.
{
custTable = null;
while select custTable
{
// custTable is now selected in company 'bbb'.
}
}
// Default company is again set back to 'aaa'.

changeCompany('ccc') // Default company is now 'ccc'.
{

// Clear custTable to let the select work
// on the new default company.
custTable = null;


while select custTable
{
// custTable is now selected in company 'ccc'.
}
}
// Default company is again 'aaa'.
}

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...