Base de Ceps

Caros,
Segue uma base de ceps mais atual com 1.345.486 ceps, já no formato para ser importada.

zips_20111206.rar

Abaixo o código para fazer a importação:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
static void loadCepsFromFile(Args _args)
{
    AddressZipCode              buffer;
    Dialog                      dialog;
    DialogField                 dfFileName;
    TextIO                      inFile;
    RecordInsertList            recordInsert = new RecordInsertList(tableNum(AddressZipCode));
    Container                   line;
    ;
 
    delete_from buffer;
 
    dialog      = new Dialog("Selecione o arquivo");
    dfFileName  = dialog.addField(typeId(FilenameOpen), "Selecione o arquivo");
    if(!dialog.run())
        return;
 
    inFile = new TextIO(dfFileName.value(), 'R');
    inFile.inFieldDelimiter(";");
 
    line = inFile.read();
    while(line)
    {
        buffer.ZipCode          = conpeek(line,1);
        buffer.City             = conpeek(line,2);
        buffer.StreetName       = conpeek(line,3);
        buffer.CountryRegionId  = conpeek(line,4);
        buffer.State            = conpeek(line,5);
        buffer.CityAlias        = conpeek(line,6);
        buffer.DistrictName     = conpeek(line,7);
 
        recordInsert.add(buffer);
        line = inFile.read();
    }
    recordInsert.insertDatabase();
}

[]s
Pichler





AX 2012 – Development I & Development II

Caros,
Seguem os links para os Training Materials:

Development I in Microsoft Dynamics AX 2012

  • Describe the basic features of Microsoft Dynamics AX 2012.
  • Review basic form navigation.
  • Review the architecture of Microsoft Dynamics AX 2012.
  • Describe the options for making development changes in Microsoft Dynamics AX 2012.
  • Describe the theory of Model Driven Architecture in Microsoft Dynamics AX 2012.
  • Review licensing and configuration.
  • Explain the MorphX development environment and the Application Object Tree.
  • Design tables using MorphX.
  • Describe the different data types within Microsoft Dynamics AX.
  • Create a new table.
  • Learn how to create and modify indexes using MorphX.
  • Describe relations on Microsoft Dynamics AX tables.
  • Learn how to create and modify Enumerated data types.
  • Learn how to create and modify views.
  • Design and build Forms in Microsoft Dynamics AX.
  • Join two data sources on a form.
  • Create customized menus and menu items.
  • Create a form using form templates.
  • Know the components of a list page.
  • Create a new FactBox.
  • Describe the elements of Role Based Security in Microsoft Dynamics AX.
  • Setup a new user.
  • Assign roles to a user.
  • Assign a security role to a user.
  • Edit duties assigned to a role.
  • Edit privileges assigned to a duty.
  • Edit permissions assigned to a privilege.
  • Search for roles with access to a menu item.

Development II in Microsoft Dynamics AX 2012

  • Identify key features of developing with X++.
  • Describe the basic foundation of object-oriented programming.
  • Use the development tools available within Microsoft Dynamics AX 2012.
  • Create object and data models from existing application elements by using the Reverse Engineering tool.
  • Use best practices to instill good programming habits.
  • Declare and use extended data types for variables.
  • Use the various operators available in X++.
  • Control program flow using conditional statements in X++.
  • Repetitively call the same blocks of code by using Loop statements.
  • Use standard functions that are built in to the application.
  • Use output commands to display data and messages to the user.
  • Use the classes within Microsoft Dynamics AX 2012 X++ development.
  • Control access to methods using Access Control Method Modifiers.
  • Extend a class using the concept of inheritance.
  • Describe the differences between an object and a class.
  • Initialize variables in the appropriate place according to scoping rules.
  • Call methods within the same class.
  • Use the different method types available.
  • Describe the similarities and differences between tables and classes.
  • Use the eventing publisher and subscriber model when modifying code in the application.
  • Retrieve data from the database using a select statement.
  • Create, update and delete data in the database.
  • Use and build queries using kernel classes.
  • Examine the exception handling mechanism in Microsoft Dynamics AX.
  • Use the Try, Catch, and Retry statements.
  • Throw an exception from code.
  • Identify and create code used to handle optimistic concurrency exceptions.
  • Set permissions on application elements.
  • Design and create security policies.
  • Secure unsafe Application Programming Interfaces (APIs) using the Code Access Security framework.
  • Authenticate data returned from display methods.

[]s
Pichler





Classe String – Greg Pierce’s blog

Caros,
achei em um projeto que estou trabalhando, uma classe chamada String que implementa alguns métodos que frequentemente precisamos usar, fui atrás e achei quem a publicou. Foi publicada por Greg Pierce, em 12/01/2007, em seu blog.

O endereço para o post e o xpo: http://greg.agiletortoise.com/software/dynamics-ax-string-class/

Recomendo dar uma olhada, vale a pena.

[]s
Pichler





Verificar a consulta usada em formulários

Caros,
Bom dia!

Ao longo deste tempo como desenvolver AX, já vi vários meio de saber “qual query está sendo executada”, e sempre vejo que uma das formas mais simples, nem sempre é usada, ou seja, nós desenvolvedores temos mania de insistir na maneira errada e não enxergar o que está bem do lado.

Para exemplificar, vou usar o formulário de transações fechadas de fornecedores, onde a tabela VendTrans se relaciona com a VendSettlement, VendTransERPemit_BR, VendTransOpen e VendTrans.

Basta clicar com o botão direito no formulário, escolher configurar, e ir até a guia Consulta, e o resultado abaixo é exibido.

Destaquei alguns pontos com as caixas em vermelho para chamar a atenção nos pontos que acho importantes.

Abraço,
Pichler





DAX 2012 – Relations agora são definidas apenas nas tabelas

Caros,
Vendo o documentos de What is New eu não havia percebido que agora os relations serão definidos apenas nas tabelas, para quem assim como eu, deixou passar, basta dar uma olhada na página 51, onde diz:

Q: What you cand do?
A: Migrate Extended Data Type (EDT) relations.
In Microsoft Dynamics AX 2009 the feature was not available
In Microsoft Dynamics AX 2012 use the EDT Relation Migration tool to move the previous relations that are defined under the EDT nodes in the AOT to the table nodes.
Q: Why is this important?
A: In earlier versions of Microsoft Dynamics AX, the relations of tables to extended data types were stored in two locations: relations in tables, and relations in extended data types. In the current version of Microsoft Dynamics AX, relations in extended data types are obsolete. Instead, we recommend that developers migrate their EDT relations to table relations. The EDT Relation Migration tool makes it easy to transfer relations from extended data types to tables.

Percebi isto quando estava lendo o material New Changed and Deprecated Features for Microsoft Dynamics AX 2012

página 8.

Quem quiser saber mais, tem uma ferramenta de migração que pode ser vista aqui: EDT Relation Migration Tool [AX 2012]

[]s
Pichler





Tags / Categorias

RSS



Arquivo

Dynamics Community