Call function in dotNet dll

Dears All;

when upgraded CRM from 7.1 to 2017 R3, shows the below error. "DotNetBuildError"

this error shown when we call the page from dotNET DLL by button or iframe.

It was working in the previous version.

please advice me.

  • 0

    Log Error.

    Class: DataPageEdit - Method: BuildContents - Error: DotNetBuildError

    Class: CRMWrapper - Method: ExecWebPageNew - Error: Managed Error on building custom page:Error HRESULT E_FAIL has been returned from a call to a COM component.

  • 0

    If this is a custom dotnet page (ie not one that is bundled with CRM 2017 r3), you will need to (at least) re-compile it to make it compatible.

  • 0

    hello Paul;

    Thank you for replay.

    I tried that but shows the same problem;

    thanks.

  • 0

    Mohannad

    I can see that you are using the DataPageEdit class.

    I think you will need to check that all of the meta data that it references are still there.

    See: community.sagecrm.com/.../8147.aspx

  • 0

    Hello;

    I expect the issue from SDK .

  • 0

    Jeff

    The link not work.

    and the Method: BuildContents already exist in DataPageEdit MetaDate as bellow

    "public override void BuildContents();"

    Thanks.

  • 0

    Mohannad

    Below is the basic structure of a DataPageEdit class

    public class projectDataPageEdit : DataPageEdit

    {

    public projectDataPageEdit()

    : base("project", "proj_projectid", "projectDetailBox")

    {

    }

    public override void BuildContents()

    {

    try

    {

    /* Add your code here */

    base.BuildContents();

    }

    catch (Exception error)

    {

    this.AddError(error.Message);

    }

    }

    }

    Errors may be created if the wrong field name 'proj_projectid' or screen name 'projectDetailBox' is referenced.

    If you believe the error comes from the code in the BuildContents then make sure that you narrow this down by to the exact point of execution. You may find creating your own log messages useful.

  • 0

    I have this issue upgrading to version 2018 r3 from version 7.3

    it works in 7.3 but now I get this exact error.

    this is my page it fails in:

    I have taken the GetTabs line out plus other lines.

    when I change it, it seems to work ok but then after a reload of the browser it fails again.

    any ideas?

    using System;

    using System.Collections.Generic;

    using System.Text;

    using Sage.CRM.WebObject;

    using Sage.CRM.Controls;

    using Sage.CRM.UI;

    using Sage.CRM.Data;

    namespace QualityMedical.Event

    {

    class EventDataPage : DataPage

    {

    public EventDataPage()

    : base("Event", "Eve_Eventid", "EventNewEntry")

    {

    }

    public override void AddEditButton()

    {

    AddUrlButton("Edit", "Edit.gif", UrlDotNet(ThisDotNetDll, "RunEventDataPageEdit"));

    }

    public override void AddContinueButton()

    {

    //AddUrlButton("Continue", "Continue.gif", UrlDotNet(ThisDotNetDll, "RunScheduledCourseExpenseGrid") + "&J=Expenses&T=ScheduledCourse");

    }

    public override void BuildContents()

    {

    try

    {

    string id = Dispatch.QueryField("Eve_EventID");

    if (GetContextInfo("Event") != id)

    {

    SetContext("Event", Convert.ToInt32(id));

    }

    base.BuildContents();

    GetTabs("Event");

    }

    catch (Exception error)

    {

    this.AddError(error.Message);

    }

    }

    }

    }