Know you that from C/AL can be opened the form by defect associated to a table? That is, with no need to know his ID. It is only necessary to indicate like parameter of function FORM.RUNMODAL (Number [, Record] [, Field]) a zero and variable of the record to treat.
For example:
recItem.SETFILTER("Gen. Prod. Posting Group", 'MERCADERIA');
FORM.RUNMODAL(0,recItem);
Using the variable recItem of type record and subtype Item and passing it as parameter we obtain that its form associated with the selected data is opened.
Tips dBits is a community of users and professionals that use and work with Microsoft Dynamics ERP NAV (Navision), related applications and other compatible technologies. In this web it will find all type of information and resources, such as news, documents, tricks, downloads, jobs, forums, tutorials and links to other webs.
Friday, July 21, 2006
Tuesday, May 30, 2006
Send email from Navision
For send email from Navision by means CAL, will use the following code:
Must be declare var objApp like Atomation assigning it to 'Microsoft Outlook 11.0 Object Library'.Application and the var objMail like Atomation assigning it to 'Microsoft Outlook 11.0 Object Library'.MailItem
//Create application
IF ISCLEAR(objApp) THEN CREATE(objApp);
//Create mail item
objMail := objApp.CreateItem(0);
//Set properties
objMail."To"('joseppages@hotmail.com');
objMail.Subject('Mail from Navision');
objMail.Body('This is a mail send from Navision.');
//Uncomment for display email
//objMail.Display();
//Send mail
objMail.Send();
Evidently that through objMail object we have other properties that we can use to our convenience, like CC or Importance.
Must be declare var objApp like Atomation assigning it to 'Microsoft Outlook 11.0 Object Library'.Application and the var objMail like Atomation assigning it to 'Microsoft Outlook 11.0 Object Library'.MailItem
//Create application
IF ISCLEAR(objApp) THEN CREATE(objApp);
//Create mail item
objMail := objApp.CreateItem(0);
//Set properties
objMail."To"('joseppages@hotmail.com');
objMail.Subject('Mail from Navision');
objMail.Body('This is a mail send from Navision.');
//Uncomment for display email
//objMail.Display();
//Send mail
objMail.Send();
Evidently that through objMail object we have other properties that we can use to our convenience, like CC or Importance.
Monday, March 20, 2006
Pass parameters between objects
Sometimes it is necessary to communicate between objects of Navision with the purpose of transferring additional or complementary information to the called object. The more used option for it is by means pass of parameters, that is, from an object we executed to another object but before we called to a function defined by us.
For example: From the form A we executed form B passing to him some parameters with additional information.
First, in form B we will add a function with the parameters to receive:
SetMyParameters(Param1 : Integer; Param2 : Integer)
MyParameter1 := Param1;
MyParameter2 := Param2;
MyParameter1 and MyParameter2 must be defined as Globals, so that they conserve the value until the object is destroyed.
Add code in event OnOpenForm of form B so check that the vars have the value assigned by means pass of parameters :
Form - OnOpenForm()
MESSAGE('MiParametro1 = %1', miParametro1);
MESSAGE('MiParametro2 = %1', miParametro2);
Second, in form A, and before execute to form B, pass the parameters:
control1000000000 - OnPush()
myFormB.SetMyParameters(1, 2); //Pass parameters to form B
myFormB.RUNMODAL; //The var. MyParameter1 and MyParameter2 have value
CLEAR(myFormB); //The var. MyParameter1 and MyParameter2 NO have value
When execute the line myFormB.RUNMODAL it shown 2 messages inform of value of global vars in form B.
For example: From the form A we executed form B passing to him some parameters with additional information.
First, in form B we will add a function with the parameters to receive:
SetMyParameters(Param1 : Integer; Param2 : Integer)
MyParameter1 := Param1;
MyParameter2 := Param2;
MyParameter1 and MyParameter2 must be defined as Globals, so that they conserve the value until the object is destroyed.
Add code in event OnOpenForm of form B so check that the vars have the value assigned by means pass of parameters :
Form - OnOpenForm()
MESSAGE('MiParametro1 = %1', miParametro1);
MESSAGE('MiParametro2 = %1', miParametro2);
Second, in form A, and before execute to form B, pass the parameters:
control1000000000 - OnPush()
myFormB.SetMyParameters(1, 2); //Pass parameters to form B
myFormB.RUNMODAL; //The var. MyParameter1 and MyParameter2 have value
CLEAR(myFormB); //The var. MyParameter1 and MyParameter2 NO have value
When execute the line myFormB.RUNMODAL it shown 2 messages inform of value of global vars in form B.
Monday, February 27, 2006
Acces methods to Navision
Due to the persecution of the obtaining of the excellence in the chain of value of the organizations by means of the optimization of business processes (BPM), every time exists more necessity to connect distributed applications, with the purpose of constructing an infrastructure of software based on services (SOA), and this way, to gain in competitiveness, doing this process more efficient, more flexible and less expensive processes and to facilitate, thus also, the decision making (BI).
Navision, like fundamental part of this infrastructure (ERP), has different methods to facilitate its integration in the processes.
Click here for access to powerpoint archive that show this methods.
Navision, like fundamental part of this infrastructure (ERP), has different methods to facilitate its integration in the processes.
Click here for access to powerpoint archive that show this methods.
Thursday, February 02, 2006
Eliminate sessions
Thanks to rvalls for post in forum of Tips dBits.
From version 4.0 of Microsoft Business Navision, it is possible to eliminate sessions, in the native BBDD as in SQL Server. For it will be acceded to the window of "Database sessions", by means of menu File-Database-Information and in the eyelash "Sessions" it will be acceded to the LookUp of "Current sessions". Simply pressing the F4 key, any session will be able to be eliminated, except the present one "My session".
From version 4.0 of Microsoft Business Navision, it is possible to eliminate sessions, in the native BBDD as in SQL Server. For it will be acceded to the window of "Database sessions", by means of menu File-Database-Information and in the eyelash "Sessions" it will be acceded to the LookUp of "Current sessions". Simply pressing the F4 key, any session will be able to be eliminated, except the present one "My session".
Subscribe to:
Posts (Atom)