web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Wie mache ich ein Feld uneditierbar mit einem Boolean Feld in der Benutzer Einrichtung?

(0) ShareShare
ReportReport
Posted on by 10

Hallo zusammen,

ich habe in der Benutzer Einrichtung ein Boolean Feld erstellt und möchte nun auf der Kreditorenkarte ein Feld nur editierbar machen wenn der Haken in der Benutzer Einrichtung beim User gesetzt ist.

Ich habe dazu eine Globale Variable in der Page 26 Vendor Card erstellt UserSetup / Record / User Setup und folgenden Code im OnValidate Trigger des Feldes selbst hinterlegt:


UserSetup.SETRANGE("User ID",USERID);

IF UserSetup.FINDFIRST THEN BEGIN
  IF UserSetup."Change marketplace properties" <> TRUE THEN BEGIN
  UserSetup.TESTFIELD("Change marketplace properties", TRUE);
  ERROR('Feldänderungsberechtigung fehlt!');
  END;


END;

Tja, dummerweise tut sich gar nichts. Muss ich an noch irgendeiner Stelle etwas tun? In der Benutzer Einrichtung ist ein einfaches Boolean Feld das eben steuern soll ob der Benutzer da was ändern darf oder nicht.

Hat irgendjemand eine Idee was ich falsch mache?

Es geht um NAV 2015.

LG und Danke für die Hilfe im Voraus.

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,794 Moderator on at

    Hi,

    Bitte ersetzen Sie Ihren Code durch unten

    Trigger OnModify ()

    begin

    Usersetup.get(userid);

    if not usersetup.<Boolenfield> then

     ERROR('Feldänderungsberechtigung fehlt!');

    end;

  • SOL_II Profile Picture
    10 on at

    Danke für die schnelle Antwort.

    Für das Feld selbst gibt es den OnModify Trigger nicht heißt das dann ich soll den OnModify der Card Page nehmen?

  • Suggested answer
    Nitin Verma Profile Picture
    21,794 Moderator on at

    Better if you put in table’s Onmodify trigger either way it will work.

    thanks

  • SOL_II Profile Picture
    10 on at

    Vielen Dank, das hilft mir wirklich weiter :-)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,993 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,116 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans