How to stop users inserting records on a List Page

AlishaAlisha Member Posts: 217
edited 2010-08-27 in NAV Three Tier
Hi,

I have a list page (type = List), but I don't want users to see or click the button "New". Instead, I want to create my own action that will handle inserting new records (there are some complicated security checkings to do). Any idea how to achive this? I cannot hide the "New" action, and if I turn the list into a Worksheet, I cannot add other Actions...

I've tried putting code to error on the OnNewRecord trigger, but it has no effect.

Thanks!

Comments

  • DenSterDenSter Member Posts: 8,307
    Have you tried setting the InsertAllowed property to 'No'?
  • AlishaAlisha Member Posts: 217
    Yes, it has no effect.
  • SavatageSavatage Member Posts: 7,142
    DenSter wrote:
    Have you tried setting the InsertAllowed property to 'No'?
    Alisha wrote:
    Yes, it has no effect.

    So you're saying they can click this "New" button and you want to disable it?
  • AlishaAlisha Member Posts: 217
    Yes, I want to disable it as I need to control who can insert certain types of records before they get to the card.

    Edit: I finally managed to solve this once on the card (using a Delayed Insert , not blank values and errors) , but I'm still curious if it's possible to disable the New button...
  • TroelshTroelsh Member, Microsoft Employee Posts: 79
    The reason for this behavior is that we leave it up to the underlying card to determine capabilities.

    So in a list without a cardformid defined "insertallowed" works as you would expect - it turns on/off the "new" button.
    If you set insertallowed to "no" on the card - the new button will be disabled on the list.

    In your scenario this might not be what you would have liked; but you may be able to workaround it - now you know the behavior.

    You might have wanted to be able to set InsertAllowed to a variable - and make the list act on it despite of the card's settings

    This posting is provided "AS IS" with no warranties, and confers no rights

    Troels Bent Hansen
    Senior Program Manager
    Microsoft Dynamics NAV


    ****** This posting is provided "AS IS" with no warranties, and confers no rights ******
  • Rob_HansenRob_Hansen Member Posts: 296
    I do hope that in a subsequent release we get back more control of page layouts so we can really manipulate them as needed. I am all for standards, and I understand the intention to have things work consistently and have the client "decide" how to render a page based on various factors, but the fact is that it's a big limitation. I wonder how useful the new full-screen / kiosk mode for the RTC will even be. Normally that sort of interface would be used for a point of sale or shop-floor terminal (a couple examples anyway). But also, you would normally want to manipulate those interfaces to have large push buttons or very specific layouts. Of course, add-ins provide some flexibility here, but we're still limited if we need to override the way the application renders the page in any fundamental way.
Sign In or Register to comment.