.Net Search Page with Date needs two submit to show correct results

SUGGESTED

I've created a very basic search page with the .Net SDK.

If I try to filter with a date field, I need to submit my page twice to get accurate results.

FYI, the correct data is correctly sent to the server in the first submit, there no differences between the two requests.

Has someone encountered the same behaviour?

  • 0

    Are you using the specialised class?

    namespace myProject
    {
        public class myClass : SearchPage
        {
            /*if descended from SearchPage then you just need to set the
            * appropriate ListName and SearchBoxName
            */
            public myClass()
            : base("xxxxSearchBoxName", "xxxxListName")
            {
                this.SavedSearch = true;
                /* *************
                * Other objects available include:
                *
                * SearchScreen
                * ResultsGrid
                */
            }
        }
    }
  • 0 in reply to Sage CRM

    Yes, here is my class:

        public class CRSearchPage : SearchPage
        {
            string parentEntityName;
            public CRSearchPage(string entityName, string parentEntityName, string CRType)
                : base(entityName + CRType + "SearchBox", entityName + CRType + "Grid")
            {
                this.parentEntityName = parentEntityName;
                SetContext("find");
                SavedSearch = true;
                AddTopContent(GetCustomEntityTopFrame("find"));
            }
            public override void BuildContents()
            {
                string licenseMsg;
                if (!LicenseManager.LicenseManager.CheckLicenseKey(AppFactory.ModuleName, this, Dispatch.InstallName, out licenseMsg)) AddError("Erreur de licence:<br/>" + licenseMsg);
                else try
                {
                    if (!CurrentUser.HasRights(Sage.PermissionType.View, parentEntityName)) AddError(Metadata.GetTranslation("Errors", "ErrCaseSecurity"));
                    else base.BuildContents();
                }
                catch (Exception ex)
                {
                    if (ex.InnerException != null) this.AddError(ex.InnerException.Message);
                    else this.AddError(ex.Message);
                }
            }
        }
    

  • 0 in reply to Sage CRM

    Hello,

    Have you seen my previous answer?

    Have you got an explanation?

    Thanks,

  • 0 in reply to [email protected]
    SUGGESTED

    I had not seen that.  But if this is a consistent error with search by date fields then this should be reported as a bug.