Discussion:
How to Disable Compulsory Fields
(too old to reply)
MattieG
2007-02-06 22:46:29 UTC
Permalink
Hi

Ive just started to play about with CRM and need to disable a
compulsory 'Name' field in a new entity.
I dont need it at all and cant use it for anything else.

Do I use the forms onLoad event to put garbage in it? Although even
then its displayed and ideally I just want it gone.
Michael Höhne
2007-02-07 08:00:36 UTC
Permalink
Every custom entity has a primary field. It is used as the display name when
referencing your entity in a lookup control.
When you create a new entity you will see two tabs. The first tab contains
the name, display name, display collection name and so one. The second tab
(usually overseen), defines the primary field. By default it is named
"Name". You can change it only when creating the custom entity, but not
afterwards. It also has to be a text field.

If you have a text field on your form that's more appropriate to serve as
the display name, you should specify it on the second tab. As said, you
cannot change it after the entity has been created, so you need to rebuild
your custom entity if you want to do it.

Hiding the name field is possible through code, but as it is required you
have to set some value. If you put garbage in it, you will see garbage in
any lookup control referencing your entity.
--
Michael Höhne, Microsoft Dynamics CRM MVP

Web: http://www.stunnware.com/crm2
Feed: http://www.stunnware.com/crm2/atom.aspx
Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup

----------------------------------------------------------
Post by MattieG
Hi
Ive just started to play about with CRM and need to disable a
compulsory 'Name' field in a new entity.
I dont need it at all and cant use it for anything else.
Do I use the forms onLoad event to put garbage in it? Although even
then its displayed and ideally I just want it gone.
Niths
2007-02-07 11:25:01 UTC
Permalink
Hi Mattie,

Generally, you can change the display name of an unused field and use it for
something else (ie., other than the intended purpose).

You can also set the required level of an attribute through Customizations
-><<Entity name>> -> Attributes -> <<select the desired attribute here>> ->
set the required level using 'Requirement level'; the options available are
(1)Business Required (2)Business Recommended (3) No constraint. Select 'No
constraint', save and publish the changes. You can also choose to remove the
field from the form.

Another option would be to hide the field using onLoad scripting.

Having said that, I agree with Michael. Name is one of the primary
attributes and it is recommended that you use it the way it is meant to be
used for ease of use if not anything else!!

Hope i didn't confuse you!

HTH,
Niths
Post by Michael Höhne
Every custom entity has a primary field. It is used as the display name when
referencing your entity in a lookup control.
When you create a new entity you will see two tabs. The first tab contains
the name, display name, display collection name and so one. The second tab
(usually overseen), defines the primary field. By default it is named
"Name". You can change it only when creating the custom entity, but not
afterwards. It also has to be a text field.
If you have a text field on your form that's more appropriate to serve as
the display name, you should specify it on the second tab. As said, you
cannot change it after the entity has been created, so you need to rebuild
your custom entity if you want to do it.
Hiding the name field is possible through code, but as it is required you
have to set some value. If you put garbage in it, you will see garbage in
any lookup control referencing your entity.
--
Michael Höhne, Microsoft Dynamics CRM MVP
Web: http://www.stunnware.com/crm2
Feed: http://www.stunnware.com/crm2/atom.aspx
Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup
----------------------------------------------------------
Post by MattieG
Hi
Ive just started to play about with CRM and need to disable a
compulsory 'Name' field in a new entity.
I dont need it at all and cant use it for anything else.
Do I use the forms onLoad event to put garbage in it? Although even
then its displayed and ideally I just want it gone.
Gowtham R
2011-03-15 10:50:20 UTC
Permalink
hi all. is it possible to create an entity without primary field? we have one requirement like that and i don't know how to proceed.Please help me.
Post by MattieG
Hi
Ive just started to play about with CRM and need to disable a
compulsory 'Name' field in a new entity.
I dont need it at all and cant use it for anything else.
Do I use the forms onLoad event to put garbage in it? Although even
then its displayed and ideally I just want it gone.
Post by Michael Höhne
Every custom entity has a primary field. It is used as the display name when
referencing your entity in a lookup control.
When you create a new entity you will see two tabs. The first tab contains
the name, display name, display collection name and so one. The second tab
(usually overseen), defines the primary field. By default it is named
"Name". You can change it only when creating the custom entity, but not
afterwards. It also has to be a text field.
If you have a text field on your form that's more appropriate to serve as
the display name, you should specify it on the second tab. As said, you
cannot change it after the entity has been created, so you need to rebuild
your custom entity if you want to do it.
Hiding the name field is possible through code, but as it is required you
have to set some value. If you put garbage in it, you will see garbage in
any lookup control referencing your entity.
--
Michael H?hne, Microsoft Dynamics CRM MVP
Web: http://www.stunnware.com/crm2
Feed: http://www.stunnware.com/crm2/atom.aspx
Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup
----------------------------------------------------------
Post by Niths
Hi Mattie,
Generally, you can change the display name of an unused field and use it for
something else (ie., other than the intended purpose).
You can also set the required level of an attribute through Customizations
-><<Entity name>> -> Attributes -> <<select the desired attribute here>> ->
set the required level using 'Requirement level'; the options available are
(1)Business Required (2)Business Recommended (3) No constraint. Select 'No
constraint', save and publish the changes. You can also choose to remove the
field from the form.
Another option would be to hide the field using onLoad scripting.
Having said that, I agree with Michael. Name is one of the primary
attributes and it is recommended that you use it the way it is meant to be
used for ease of use if not anything else!!
Hope i didn't confuse you!
HTH,
Niths
Submitted via EggHeadCafe
Pass Values Between Windows Forms
http://www.eggheadcafe.com/tutorials/aspnet/a3e1e170-21d9-4a59-a659-3ead05bb36f2/pass-values-between-windows-forms.aspx
Gowtham R
2011-03-15 13:36:55 UTC
Permalink
hi...is it possible to create an entity without primary field? we have a requirement like that.Thanks.
Post by MattieG
Hi
Ive just started to play about with CRM and need to disable a
compulsory 'Name' field in a new entity.
I dont need it at all and cant use it for anything else.
Do I use the forms onLoad event to put garbage in it? Although even
then its displayed and ideally I just want it gone.
Post by Michael Höhne
Every custom entity has a primary field. It is used as the display name when
referencing your entity in a lookup control.
When you create a new entity you will see two tabs. The first tab contains
the name, display name, display collection name and so one. The second tab
(usually overseen), defines the primary field. By default it is named
"Name". You can change it only when creating the custom entity, but not
afterwards. It also has to be a text field.
If you have a text field on your form that's more appropriate to serve as
the display name, you should specify it on the second tab. As said, you
cannot change it after the entity has been created, so you need to rebuild
your custom entity if you want to do it.
Hiding the name field is possible through code, but as it is required you
have to set some value. If you put garbage in it, you will see garbage in
any lookup control referencing your entity.
--
Michael H?hne, Microsoft Dynamics CRM MVP
Web: http://www.stunnware.com/crm2
Feed: http://www.stunnware.com/crm2/atom.aspx
Custom Lookup Dialog: http://www.stunnware.com/crm2/?area=customLookup
----------------------------------------------------------
Post by Niths
Hi Mattie,
Generally, you can change the display name of an unused field and use it for
something else (ie., other than the intended purpose).
You can also set the required level of an attribute through Customizations
-><<Entity name>> -> Attributes -> <<select the desired attribute here>> ->
set the required level using 'Requirement level'; the options available are
(1)Business Required (2)Business Recommended (3) No constraint. Select 'No
constraint', save and publish the changes. You can also choose to remove the
field from the form.
Another option would be to hide the field using onLoad scripting.
Having said that, I agree with Michael. Name is one of the primary
attributes and it is recommended that you use it the way it is meant to be
used for ease of use if not anything else!!
Hope i didn't confuse you!
HTH,
Niths
Post by Gowtham R
hi all. is it possible to create an entity without primary field? we have one requirement like that and i don't know how to proceed.Please help me.
Submitted via EggHeadCafe
SharePoint 2010 Using External List
http://www.eggheadcafe.com/tutorials/aspnet/71ee360f-d781-48d6-8243-769d96b45064/sharepoint-2010-using-external-list.aspx
Loading...