cancel
Showing results for 
Search instead for 
Did you mean: 

Edit Form UI Functionality in Addon

former_member609283
Participant
0 Kudos

Hello Everyone,

     I developed different add-on applications, now If I want to use Edit Form UI Functionality of SAP Business One to hide or make any field active/Inactive without going in code, Can I use that??

I was trying to do with my add-on but is not working. when I open that form again, it showed me all the fields.

What can I add in my code to make this functionality functional?

Same goes with UDFs.

How can I do that??

Reagrds,

Idrees

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member233854
Active Contributor
0 Kudos

You will not be able to let the users modify your edittext without changing it in your code unless you develop your own configuration for it. There are some add-ons as B1Up that allow you to customize any form.

If they want to customize the columns in a matrix I believe you can use the standard functionality of form settings.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Idrees,

Can you please explain which Form and Item you would like to edit?

Kind regards,

ANKIT CHAUHAN

SAP SME Support

former_member609283
Participant
0 Kudos

Hey Ankit,

     The form I have designed in my Add-on.

edy_simon
Active Contributor
0 Kudos

Hi Idrees,

User form can not be modified using the Edit Form UI Functionality of SAP

Even SAP system form it self, not all can be modified using this functionality.

Regards

Edy

Former Member
0 Kudos

Hi Idrees,

if you want to have some Form Items InVisible or Disable and in case that your form is AutoManaged, you can use the code above:


AutoManageAttribute(editTextCode.Item, SAPbouiCOM.BoAutoManagedAttr.ama_Editable, SAPbouiCOM.BoAutoFormMode.afm_All, SAPbouiCOM.BoModeVisualBehavior.mvb_False);

AutoManageAttribute(editTextCode.Item, SAPbouiCOM.BoAutoManagedAttr.ama_Editable, SAPbouiCOM.BoAutoFormMode.afm_Find, SAPbouiCOM.BoModeVisualBehavior.mvb_True);

public static void AutoManageAttribute(SAPbouiCOM.Item _oItem, BoAutoManagedAttr _enAttribute, BoAutoFormMode _enFormMode, BoModeVisualBehavior _enBehavior)

        {

            try

            {

                _oItem.SetAutoManagedAttribute(_enAttribute, (int)_enFormMode, _enBehavior);

            }

            catch (Exception ex)

            {

               // Log Error

            }

        }

With the below code, for an UDO AutoManaged form i'm disabling the EditText  for the Code of the Record for all modes and i'm enabling it only for the case of search.

This way is easier than turning the property Enabled to True / False because in case that you want to disable it and the cursor is on this item you will receive an error like "The Item is in Focus". For this case you have first to focus another form item (send a click event) and then disable it.

Kind Regards,

Evangelos D. Plagianos

former_member609283
Participant
0 Kudos

Hey Vaggelis,

     You mean to say that if I use AutoManaged Property, then only i am able to customize my screen of add-on using Edit Form UI Functionality?

Basically I am taking care of Development, my implementation team sometimes came accross a situation where they want to use SAP Business One Edit Form UI functionality to hide/unhide or active/inactie fields based on client's requirements instead of passing query to me and then I have to change it from code and make another .ard and then send them back.

That's what I want to ask, that how they can manipulate with add-on form??

Regards,

idrees

former_member183373
Active Participant
0 Kudos

Hello Idrees,

Below code should be working for changing visible/active property of the items.

            EditText1.Item.Visible = false;

            EditText1.Item.Enabled = false;

Could you share your code if you already use that? Also can you make sure if you can really manipulate items in the form? Like changing its' text or position.

Kind Regards,

Atilla