Tuesday, April 29, 2014

set based operations

insert_recordset: 
insert_recordset is a record set-based operator, which performs operations on multiple records at a time. However, it can fall back to record-by-record operations in many situations.
insert_recordset copies data from one or more tables directly into one resulting destination table on a single server trip.
Using insert_recordset is faster than using an array insert. However, array inserts are more flexible if you want to handle the data before you insert it.
Example:
insert_recordset myTable (myNum, mySum)
                 select myNum, sum(myValue)
                 from anotherTable
                 group by myNum
                 where myNum <= 100;
update_recordset: 
The X++ SQL statement update_recordset enables you to update multiple rows in a single trip to the server. 
This means that certain tasks may have improved performance by using the power of the SQL server.

update_recordset resembles delete_from in X++ and to UPDATE SET in SQL. It works on the database server-side on an SQL-style record set, instead of retrieving each record separately by fetching, changing, and updating.
AOT-->Tables-->SlaesTable-->Methods-->updateDeadlineOnline()
delete_from:
You can delete multiple records from a database table by using a delete_from statement.
This can be more efficient and faster than deleting one record at a time by using the xRecord.delete method in a loop.
If you have overridden the delete method, the system interprets the delete_from statement into code that calls the delete method one time for each row that is deleted.
AOT-->Tables-->SlaesTable-->Methods-->deleteAllLines

public static void deleteAllLines(SalesId _salesId)
{
    SalesLine   salesLine;
    ttsbegin;
    delete_from salesLine where salesLine.SalesId == _salesId;
    ttscommit;
}

Friday, April 25, 2014

infolog : Report is scaled XXX percent to fit to page in AX 2009

when i opening a report every time showing a infolog "ReportNmae - Report is scaled XXX percent to fit to page "



solution: report level in init method write below line code after super

             this.printJobSettings().suppressScalingMessage(true);

Tuesday, March 18, 2014

Types of DataSources

Types of DataSources in AOT:

A form data source supplies the data that appears on a form. 
To display data, you assign a data field from the form data source to a property of a control that appears on the form.

1. Table: 

A table is a business object in the Data Dictionary node of the AOT. A table is an object that contains data records for the system. In additionally, a table can define a table relation that enables you to look up data from a referenced table.

2. View:
A view is a business object in the Data Dictionary node of the AOT. A view is a stored query that retrieves a specified collection of data records and fields. The data in a view is retrieved when the view is accessed. 

How to use in form level:

AOT>DataDictionary>View>DirPartyView

AOT>Form>DirPartyTable



3. Query:


A query is a business object in the Queries node of the AOT. A query uses tables, maps, or views to retrieve a set of data fields. To use a query as a form data source, you use the Query property of the Data Sources node to specify the query for the form.
You might find that a query has set the Dynamic property of the Fields node to No. You set Dynamic to No when you want to specify the list of fields that appear in the query. When you add that query to the Data Sources of a form, the list of fields in the table node include all the fields for the table.

Monday, March 17, 2014

I am trying to install IIS showing a error message in internet explorer:

trying to install IIS showing a error message in internet explorer:



Solution:

Internet exploreràinternet optionsàadvanced tab pageà resetàreset.

Thursday, February 27, 2014

some useful RUN (Windows+r) commands in windows


                   To Access                                                       Run Command
  1. Add/Remove Programs                                              appwiz.cpl   
  2. Administrative Tools                                                  control admintools
  3. Command Prompt                                                     cmd
  4. Event Viewer                                                             eventvwr.msc
  5. Registry Editor                                                           regedit
  6. Remote Desktop                                                        mstsc
  7. Network Connections                                                ncpa.cpl
  8. Services                                                                     services.msc
  9. System Configuration Utility                                        msconfig
  10. Task Manager                                                            taskmgr
  11. System Properties                                                      sysdm.cpl
  12. Windows Firewall                                                      firewall.cpl
  13. Local Users and Groups                                             lusrmgr.msc
  14. Date and Time Properties                                           timedate.cpl
  15. Display Properties                                                      desk.cpl
  16. Notepad                                                                    notepad
  17. Calculator                                                                  calc
  18. Shuts Down Windows                                               shutdown
for more commands

Thursday, February 6, 2014

Warning: Field 'Group' must be filled in.

The above Warning message "Field 'Group' must be filled in" pops up.  But, there is no 'Group' field.

Solution: Group is nothing but a CustGroup or VendGroup field.
 go to table level find out CustGroup r VendGroup field and set mandatory field YES to NO  or find the control and fill in form level.

update_recordset with joins

 update_recordset with joins update_recordSet storeTransfer         setting      TransactionId = transfertable.TransferId     join transfert...