# I want MBS to put in new Form properties!

**URL:** <https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275>\
**Category:** Developers Forum\
**Created:** [September 29, 2005, 6:27pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275 "2005-09-29T18:27:59Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Joe](https://www.dynamicsuser.net/u/Joe)\
**Post date:** [September 29, 2005, 6:27pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/1 "2005-09-29T18:27:59Z")

</div>

I can even suggest the Names[:p] EditModeEnabled Boolean DefaultEditMode Boolean Wouldn’t it be nice if you just could set a property on any form and woops they would become non editable and a edit button popped up from noware… I keep doing this change to customer,Vendor,Item GL Account list & Card, then in many many “supportive tables” list boxes…like “Payment Terms” etc… Anyone who has some smart ideas forhandeling this in general…?

---

<div class="post-metadata">

**Author:** ![David\_Singleton](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/david_singleton/32/7471_2.png) [@David\_Singleton](https://www.dynamicsuser.net/u/David_Singleton)\
**Post date:** [September 29, 2005, 8:07pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/2 "2005-09-29T20:07:02Z")

</div>

Yes it would be nice, but there are more important things that I would prefer. I generally modify most List forms with this code … ` OnOpenForm() IF CurrForm.LOOKUPMODE THEN CurrForm.EDITABLE(FALSE);` and add a button with this ` OnPush() CurrForm.EDITABLE(TRUE);` this way users don’t accidently change things when doing a lookup. The thing is, it can be done, so we can live with it. More important are properties that can’t be changed in code. I would much rather that every Form property was also a function, and that what works on forms, worked on reports.

---

<div class="post-metadata">

**Author:** ![Marq](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Marq](https://www.dynamicsuser.net/u/Marq)\
**Post date:** [September 29, 2005, 8:33pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/3 "2005-09-29T20:33:08Z")

</div>

If you cannot put code in forms you can also use the InlineEditing property, this requires a F2 before the form becomes editable.

---

<div class="post-metadata">

**Author:** ![anfinnur](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@anfinnur](https://www.dynamicsuser.net/u/anfinnur)\
**Post date:** [September 30, 2005, 12:04pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/4 "2005-09-30T12:04:24Z")

</div>

> **quote:**
> 
> | …I generally modify most List forms with this code … ` OnOpenForm() IF CurrForm.LOOKUPMODE THEN CurrForm.EDITABLE(FALSE);`  
> _Originally posted by David Singleton - 2005 Sep 29 : 21:07:02_  
> |
> | --- |

A “nicer” syntax is ` OnOpenForm() CurrForm.EDITABLE(NOT CurrForm.LOOKUPMODE);`

---

<div class="post-metadata">

**Author:** ![Marq](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Marq](https://www.dynamicsuser.net/u/Marq)\
**Post date:** [September 30, 2005, 12:36pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/5 "2005-09-30T12:36:32Z")

</div>

I do not agree, sorry. The code devided into 2 lines is more readable, also you do not need to change the editable property always. Of the lookupmode is false, it has no use in changing the property, the second option does this. Sometimes it is better write more code in order to maintain readability.

---

<div class="post-metadata">

**Author:** ![ara3n](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ara3n](https://www.dynamicsuser.net/u/ara3n)\
**Post date:** [September 30, 2005, 2:10pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/6 "2005-09-30T14:10:44Z")

</div>

Well something that you all probably forgot about this code is that if there is not recrod the Form becomes disabled and cripled. So you should test and see if there are any records before running the code. CurrForm.EDITABLE(NOT CurrForm.LOOKUPMODE); Btw. This is a rookie mistake.

---

<div class="post-metadata">

**Author:** ![lars\_westman](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lars\_westman](https://www.dynamicsuser.net/u/lars_westman)\
**Post date:** [September 30, 2005, 2:12pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/7 "2005-09-30T14:12:06Z")

</div>

And WHY do they not change the calls to variables of type dialog so they are automatically supressed when GUIALLOWED is FALSE. Then we didn’t have to change that when using code with NAS

---

<div class="post-metadata">

**Author:** ![David\_Singleton](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/david_singleton/32/7471_2.png) [@David\_Singleton](https://www.dynamicsuser.net/u/David_Singleton)\
**Post date:** [September 30, 2005, 3:08pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/8 "2005-09-30T15:08:17Z")

</div>

Anfinnur, your code is completely different to mine, and does a different thing. The code I am using will set the form to be non editable if the form is in lookup mode. Your’s in addition to that will force the form to be editable if it is not in lookup mode, which is not what I want, since there are other conditions that also could make the form non editable. In fact I did originally have the code as you show, but it did cause issues on a few forms. Ahmed, I’m not sure I see your point. I’ve installed this on many systems, and seen it running at least 8 years on systems without coming across the issue you mention?

---

<div class="post-metadata">

**Author:** ![ara3n](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ara3n](https://www.dynamicsuser.net/u/ara3n)\
**Post date:** [September 30, 2005, 3:28pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/9 "2005-09-30T15:28:24Z")

</div>

I guess David you’ve been very lucky and your customers’ tables had data in them at all times.

---

<div class="post-metadata">

**Author:** ![David\_Singleton](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/david_singleton/32/7471_2.png) [@David\_Singleton](https://www.dynamicsuser.net/u/David_Singleton)\
**Post date:** [September 30, 2005, 3:55pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/10 "2005-09-30T15:55:27Z")

</div>

Try it… [:D]

---

<div class="post-metadata">

**Author:** ![ara3n](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ara3n](https://www.dynamicsuser.net/u/ara3n)\
**Post date:** [September 30, 2005, 8:02pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/11 "2005-09-30T20:02:13Z")

</div>

try what? that the form becomes unusable if there is no records in it? Even your button becomes unusable, if there is no records in the form. So you can’t press the button.

---

<div class="post-metadata">

**Author:** ![David\_Singleton](https://sea1.discourse-cdn.com/flex023/user_avatar/www.dynamicsuser.net/david_singleton/32/7471_2.png) [@David\_Singleton](https://www.dynamicsuser.net/u/David_Singleton)\
**Post date:** [September 30, 2005, 8:49pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/12 "2005-09-30T20:49:13Z")

</div>

No I mean “Try It”, put this code in a form, delete all the records, and you will see that it works fine.[:D]

---

<div class="post-metadata">

**Author:** ![ara3n](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ara3n](https://www.dynamicsuser.net/u/ara3n)\
**Post date:** [September 30, 2005, 10:18pm UTC](https://www.dynamicsuser.net/t/i-want-mbs-to-put-in-new-form-properties/10275/13 "2005-09-30T22:18:43Z")

</div>

I did it again just to make sure they haven’t changed in 4.0, and it’s the same result. The form i used is 5909 Service Item Group On OpenForm added your code. I added a new button. and on push added your code. From the Item card I clicked the lookup button and the form is disabled. The buttons are all disabled. So onpush on the new button doesn’t work. Have you tried it?
