<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tt/onlinemanual/100124" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">DAL 2 Overview</Title>
		<Keyword ContextSensitive="No"><Level1>DAL 2</Level1>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>Data Access Layer</Level1>
		</Keyword>
	</Header>
	<GeneralSection ID="dal2"><Paragraph class="Default">DAL 2 scripts are introduced in ERP LN. A DAL 2 script contains <Emphasis>all</Emphasis> business logic (database logic + other logic) related to a particular table. The UI scripts of the sessions operating on the table, only contain UI logic.</Paragraph>
		<Paragraph class="Default">DAL 2 scripts are therefore perfectly suited for integrations via Infor ERP LN Business Adapter. Other applications can connect, through the <Link href="/baanerp/tt/glossary/glossary#100260" role="glossary">BOL</Link>, to an ERP LN table. The business logic in the table's DAL 2 script is executed automatically. So, to build an integration, you don't need to rebuild this business logic in the BOIs that provide the interface.</Paragraph>
		<Paragraph class="Default">Various predefined <Link href="/baanerp/tt/glossary/glossary#100032" role="glossary">business objects</Link>, that can be used for integration purposes, are delivered with ERP LN. DAL 2 scripts are only available for tables that are used in these business objects. For the remaining tables, DAL 1 scripts are available.</Paragraph>
		<List><ListIntro>In DAL 2 various new hooks are introduced. A DAL 2 script can contain:</ListIntro>
			<ListItem>Object hooks: these hooks are identical to the object hooks in DAL 1 scripts.</ListItem>
			<ListItem>Field hooks. Field hooks contain the business logic for table fields. They can contain, for example, logic to: <List><ListItem>check the input on a field (logical integrity rules).</ListItem>
					<ListItem>make a field read-only.</ListItem>
					<ListItem>make a field invisible.</ListItem>
					<ListItem>automatically update a field, after a related field was changed.</ListItem>
					<ListItem>make input on a field mandatory.</ListItem>
					<ListItem>hide a particular enumerated constant from an enum list.</ListItem>
				</List>
			</ListItem>
			<ListItem>Business method hooks. These hooks are used to disable/enable and hide specific <Link href="/baanerp/tt/glossary/glossary#100053" role="glossary">form commands</Link> of type "business method".</ListItem>
		</List>
		<Paragraph class="Default">You can view and edit DAL 2 scripts via the <Link href="/baanerp/tt/adv/ttadv2530m000" role="session">Program Scripts / Libraries (ttadv2530m000)</Link> session. The script type is "DAL (version 2)".</Paragraph>
		<Paragraph class="Default">For details on DAL 2 scripts, refer to "DAL 2 Overview" in the <DocRef>ERP LN 6.1 Programmer's Guide</DocRef> ( <Code>progguide.chm</Code> Help file), which is stored in the <Code>help</Code> folder in the installation folder of your Infor BW Client.</Paragraph>
		<Note><SectionTitle>
                                 Note
                              </SectionTitle>
			<Paragraph class="Default">The <Code>progguide.chm</Code> Help file is delivered with the Dynamic Form Editor ( DFE ). If the file is not present on your PC, you must first install the DFE from the ERP LN installation CD.</Paragraph>
		</Note>
	</GeneralSection>
	<RelatedTopics><SectionTitle>
                              Related topics
                           </SectionTitle>
		<RelTopic><Link href="/baanerp/tt/onlinemanual/100123" role="manual">DAL 1 Overview</Link>
		</RelTopic>
	</RelatedTopics>
</ManualTopic>
