<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/tl/onlinemanual/000020c" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">How to test the Delete method</Title>
		<Keyword ContextSensitive="No"><Level1>Business Object Layer (BOL)</Level1>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>
                                 Infor ERP LN Development Tools
                              </Level1>
		</Keyword>
		<Keyword ContextSensitive="No"><Level1>Delete method</Level1>
		</Keyword>
	</Header>
	<AimSection><Paragraph class="Default">This topic describes how you can test the public Delete method of a <Link href="/baanerp/tt/glossary/glossary#100032" role="glossary">Business Object</Link>.</Paragraph>
	</AimSection>
	<GeneralSection><SectionTitle>XML schema file request</SectionTitle>
		<Figure space-and-orientation="indented-estimated"><FigIntro>The following figure shows the XML schema file of the Request argument of the Delete method of the Order (tlbct790) Business Object.</FigIntro>
			<HTML:IMG height="224" width="580" SRC="../images/nt_screen_000020ca.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020ca.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020ca.gif" ID="IDA3ZBAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/><FigCaption>tl bct bl790bdlrq0000.xsd tlbct790-Delete-Request</FigCaption>
		</Figure>
	</GeneralSection>
	<GeneralSection><SectionTitle>Enter the request</SectionTitle>
		<Paragraph class="Default">In this example order six, one line, is deleted. To do so, fill in the orderNumber attribute. All lines must be deleted.</Paragraph>
		<Figure space-and-orientation="indented-estimated"><HTML:IMG height="347" width="352" SRC="../images/nt_screen_000020cb.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020cb.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020cb.gif" ID="IDAG0BAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<Paragraph class="Default">You cannot delete lines separately with the delete method. To delete these lines separately, you can use the Delete action type in the Change method. Refer to <Link href="/baanerp/tl/onlinemanual/000020b#actiontype" role="manual">Action type</Link> for details.</Paragraph>
		<Paragraph class="Default">Save the Request argument and close the graphical browser to return to the <GUIRef href="/baanerp/tl/bct/tlbct3250m000" role="session">BOL Test Tool - Public Layer (tlbct3250m000)</GUIRef> session.</Paragraph>
	</GeneralSection>
	<GeneralSection><SectionTitle>Execute Test</SectionTitle>
		<Paragraph class="Default">When the Request argument is created, you can run the test. Click <GUIRef href="/baanerp/tl/bct/tlbct3250m000#testdll" role="command">Execute Test</GUIRef>. Refer to <Link href="/baanerp/tl/onlinemanual/000020a#executetest" role="manual">Execute test</Link> for details.</Paragraph>
	</GeneralSection>
	<GeneralSection><SectionTitle>View response</SectionTitle>
		<Figure space-and-orientation="indented-estimated"><FigIntro>If the request is successful, the <GUIRef href="" role="manual">Response</GUIRef> Graphical Browser looks as follows:</FigIntro>
			<HTML:IMG height="287" width="404" SRC="../images/nt_screen_000020cc.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020cc.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020cc.gif" ID="IDAP0BAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
		<Paragraph class="Default">As you can see, the Graphical Browser does not contain information.</Paragraph>
	</GeneralSection>
	<GeneralSection><SectionTitle>View Result</SectionTitle>
		<Paragraph class="Default">Assume the application logic as follows: approved orders cannot be deleted.</Paragraph>
		<Paragraph class="Default">The DAL script contains the following code:</Paragraph>
		<CodeBlock space-and-orientation="indented-estimated">function domain tcbool destroy.method.is.allowed()
{
 if tlbct700.stat = gaadv.stat.approved then
     dal.set.error.message("@Not allowed to delete Order")
     dal.set.error.message("@Order Life Cycle is Approved")
     return(false)
 endif

 return(true)
}</CodeBlock>
		<Figure space-and-orientation="indented-estimated"><FigIntro>The Result message looks like the following:</FigIntro>
			<HTML:IMG height="588" width="457" SRC="../images/nt_screen_000020cd.gif" path="/enterpriseserver/tools/tl/onlinemanual" btb-count="1" btb-count2="1" btb-image-name="nt_screen_000020cd.gif" btb-source-path="C:\SVN\docnl\Technology\EnterpriseServer~8.5\EnterpriseServer" btb-image-path="/enterpriseserver/tools/tl/images/nt_screen_000020cd.gif" ID="IDAY0BAC" alt="[...]" xmlns:HTML="http://www.w3.org/TR/REC-html40"/></Figure>
	</GeneralSection>
	<RelatedTopics><SectionTitle>Related topics</SectionTitle>
		<RelTopic><Link href="/baanerp/tl/onlinemanual/000020" role="manual">How to test public methods for Infor ERP LN</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tl/onlinemanual/000010" role="manual">How to test protected methods for Infor ERP LN</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/tt/onlinemanual/100107" role="manual">To Model a Business Object</Link>
		</RelTopic>
	</RelatedTopics>
</ManualTopic>
