<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tt/onlinemanual/100121" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">Session Synchronization</Title>
		<Keyword ContextSensitive="No"><Level1>Session Synchronization</Level1>
		</Keyword>
	</Header>
	<GeneralSection ID=""><SectionTitle>Synchronized sessions overview</SectionTitle>
		<Paragraph class="Default">
                              ERP LN provides several mechanisms for starting one session from another – these are zoom fields, synchronized sessions, and the 4GL start.session() function. This topic describes synchronized sessions and associated functions. When two sessions are synchronized, actions performed on one session window have a direct effect on the other session window. ERP LN implements two synchronization models:</Paragraph>
		<List><ListItem>Dialog synchronization</ListItem>
			<ListItem>Child synchronization</ListItem>
		</List>
	</GeneralSection>
	<GeneralSection><SectionTitle>Dialog synchronization</SectionTitle>
		<Paragraph class="Default">This synchronizes a multi-occurrence parent session with a single-occurrence dialog session. Both sessions act on the same main table. The parent session can be a modeless multi-occurrence display form or a modal multi-occurrence zoom window.</Paragraph>
		<Paragraph class="Default">When the user double-clicks on an occurrence in the parent session, the 4GL engine automatically opens the <GUIRef href="" role="manual">synchronized dialog</GUIRef> (details) session (if it is not already open) and updates it with information from the selected record. Whether the dialog opens in edit or display mode depends on user authorization settings. The synchronized dialog is also opened automatically when the user initiates one of the following actions: insert record, edit record, or duplicate record.</Paragraph>
		<Paragraph class="Default">When a record is saved in the synchronized dialog, the 4GL engine automatically updates the occurrence in the parent window.</Paragraph>
		<Paragraph class="Default">The synchronization must be defined in the Overview session, it can be specified on two ways:</Paragraph>
		<List><ListItem>Define the function <GUIRef href="" role="manual">set.synchronized.dialog</GUIRef> ("details session code") in the <GUIRef href="" role="manual">before.program</GUIRef> section of the <GUIRef href="" role="manual">UI script</GUIRef>.</ListItem>
			<ListItem>Define the <GUIRef href="" role="manual">details</GUIRef> session code in the <Link href="/baanerp/tt/adv/ttadv2100s000#ttadv300.zj_sync" role="formfield">Synchronized Dialog</Link> field of the <Link href="/baanerp/tt/adv/ttadv2100s000" role="session">Sessions (ttadv2100s000)</Link> session.</ListItem>
		</List>
		<Note><SectionTitle>
                                 Note
                              </SectionTitle>
			<Paragraph class="Default">Overview session and Detail session can be the same session.</Paragraph>
		</Note>
		<ExampleSection><SectionTitle>
                                 Example: Overview and Detail sessions are separate sessions</SectionTitle>
			<Paragraph class="Default">Business Partners:</Paragraph>
			<Paragraph class="Default">Overview session: tccom4500m000</Paragraph>
			<Paragraph class="Default">Details session: tccom4100s000</Paragraph>
		</ExampleSection>
		<ExampleSection><SectionTitle>
                                 Example: Overview and Detail session is the same session</SectionTitle>
			<Paragraph class="Default">Employees:</Paragraph>
			<Paragraph class="Default">Overview session: tccom0101m000</Paragraph>
			<Paragraph class="Default">Details session: tccom0101m000</Paragraph>
		</ExampleSection>
	</GeneralSection>
	<GeneralSection><SectionTitle>Child synchronization</SectionTitle>
		<Paragraph class="Default">Normally, this is used to synchronize sessions that act on different main tables. In this case, the primary key of the parent's main table must be a subset of the primary key of the child's main table.</Paragraph>
		<Paragraph class="Default">For example, take an Orders table that lists client orders, and an Order lines table that lists order lines per order. The primary key of the Orders session is orderno. The primary key of the Order lines session is orderlines.orderno. In the Order lines session, orderno is a foreign key that references the Orders table.</Paragraph>
		<Paragraph class="Default">With child synchronization, you can synchronize a parent session that uses the Orders table with a child session that uses the Order lines table. The user chooses a form command to open the child session from the parent session. So the user can view the order lines associated with the orders listed in the parent session.</Paragraph>
	</GeneralSection>
	<RelatedTopics><SectionTitle>
                              Related topics
                           </SectionTitle>
		<RelTopic>For details on Session Synchronization, refer to "Synchronized sessions 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. Note: 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.</RelTopic>
	</RelatedTopics>
</ManualTopic>
