Skip to Content
0
Former Member
Jul 10, 2013 at 08:30 AM

Hiding items on system forms with XML

269 Views

** Moved from Business One forum to B1 SDK, as the question is more relevant here. Original thread: http://scn.sap.com/thread/3386575 **

Is it possible to hide items on system forms using XML with LoadBatchActions()?

I know this is possible using the standard UI API calls, e.g. oForm.Items.Item("394").Visible = false; // or something along those lines

But I'd like to do it in XML as I believe the performance is better, meaning there's less delay when opening the form (it's awfully slow when hiding lots of items in one go). I have the following XML but it doesn't work - I can change the caption of the item by adding this to the <specific> block (so I know I'm on the right lines), but I cannot change the visibility of the item. I've tried changing the frompane and topane attributes to -1 to hide, but that also doesn't work.

<?xml version="1.0" encoding="UTF-16"?>

<Application>

<forms>

<action type="update">

<form FormType="134" uid="">

<datasources />

<Menus />

<items>

<action type="update">

<item uid="394" frompane="-1" topane="-1">

<AutoManagedAttribute>

<Attribute description="visible" id="1" modeAdd="0" modeFind="0" modeOk="0" modeView="0" />

<Attribute description="editable" id="2" modeAdd="0" modeFind="0" modeOk="0" modeView="0" />

</AutoManagedAttribute>

<specific />

</item>

</action>

</items>

<DataBrowser/>

</form>

</action>

</forms>

</Application>

Does anyone know if this is possible, and if so how I can change the above XML to make it work?

Cheers.