Access base Field .NET

  • I have the base screen in .net sage crm how can i access the field in the screen???????????? and give it caption or onchange or .....etc

    how r u Jeff??


  • John

               EntryGroup myScreen = new EntryGroup("myScreenBlock");

               myScreen.CustomContent = "customcontent";

               myScreen.NewLine = true; //true|false

               myScreen.Title = Metadata.GetTranslation("captionFamily", "captionCode");

               Entry entryname = myScreen.GetEntry("myfield");

               //Entry myEntry = myScreen.CreateEntry("myfield");

               //Entry myEntry = myScreen.CreateEntrySelect("myfield");

               //bool bResult = myScreen.RemoveEntry("myfield");

               entryname.Caption = Metadata.GetTranslation("captionFamily", "captionCode");

               entryname.CaptionFamily = "captionFamily";

               entryname.CaptionPos = Sage.CaptionPositions.Left;

               entryname.Height = 1;

               entryname.Hidden = true; //true|false;

               entryname.MaxLength = 60;

               entryname.NewLine = true; //true|false;

               entryname.ReadOnly = true; //true|false

               entryname.Required = true; //true|false

               entryname.Size = 1;

               entryname.Width = 1;

               entryname.CreateScript = "script";

               entryname.OnChangeScript = "script";

               entryname.ValidateScript = "script";

  • but jeff i try this befor but its dosnt work on base screen ???

    is it work only on custom screen that built from scratch

    thanks for help

  • John

    Let me know if this helps.

       public class myClass : DataPage


           /* Constructor needs EntityName, IdField and ScreenName


           public myClass()

               : base("xxxxTableName", "xxxx_fieldname", "xxxxScreenName")


               EntryGroup myScreen = EntryGroups[0];

               myScreen.Title = "My Caption";

               this.UseEntityTabs = true;

               this.UseWorkflow = true;

               this.EditMethod = "RunDataPageEdit";

               this.ContinueMethod = "RunListPage";



  • Jeff U R wonderful its work ;)


  • How can i make tab highlighted  ???? its last question :) Jeff

  • John

    GetTabs("company", "mytab");

  • its not work thanks jeff for Reply

  • John

    What is you exact version of Sage CRM?

    What is the name of your Tab Group? (e.g. Company)

    What is the name/cpation of your Tab? (e.g. My Tab)

  • ver 7.1 SP2

    and i use custom entity  Ex:Application

    base.GetTabs("ApplicationTab","ApplicationTabHighlited"); but not work :(

  • any help???????????????

  • John

    Below is my example

       public class MyCustomPage : Web


           public override void BuildContents()



               AddContent("My Custom Page");


               //how to show translated values - maybe

               AddContent(Metadata.GetTranslation(Sage.Captions.sFam_GenMessages, "HelloWorld"));


               //how to check sys param values

               AddContent("The Base Currency is: " + Metadata.GetParam(Sage.ParamNames.BaseCurrency));






  • not work for custom entity :/

  • John

    If you think there is a fault with the API call then you will need to log a case.

  • ok thanks Jeff