Secondary Entity for Opportunity

We have added numerous columns to the Opportunity table, and ultimately I want to add a new table tying to the Opportunity to extend additional Opportunity Details into. Using the Advanced customization wizard as I am finding it the optimal solution, as from my experience it makes the new entity a one to many set-up, and I only need a one-to-one table, that doesn't need communications, or workflow, or anything else that the wizard sets up for you. I want to put this table as a new tab under Opportunity that doesn't lead to a list rather directly to the table with change screen capabilities. Is this even a possibility?

Parents
  • 0

    Hello

    You can run the Advanced Customization Wizard and have it create a new entity.  And you can decide which tick boxes to select to describe the relationship as you need it.  Even if the 'extended' opportunity will exist on a one to one basis with the main opportunity it is nevertheless a child of the parent opportunity.  You can may the relationship one to one by changing the interface and the rules.

    The use of the wizard will short cut the creation of the new entity. And it will be very useful for the ASP pages etc BUT it may be overkill.  You many not need the new entity covered by a separate security policy, or have it separately accessed in the recent menu etc.

  • 0 in reply to Sage CRM

    Okay following what you are saying how do I make the tab so it doesn't go to a list, but rather directly to the Change Summary Screen?

  • 0 in reply to DKarkanica

    Your first challenge is going to be how to create the extended opportunity record so that it is there when the tab is accessed.  You need to think about the user experience.  

  • 0 in reply to Sage CRM

    Simple SQL Insert Statement, connected to Opportunity that creates all those that exist. Then a simple Insert Trigger that inserts the needed record into the table.

  • 0 in reply to DKarkanica

    Then you only need to change the list page to display an edit page.  You will have the context of the parental opportunity and there will only be one child.  That means you can find the child entity by searching on the foreign key field.

  • 0 in reply to Sage CRM

    Any chance I can get some pointers on what to change where here. I understand what you're saying but I am not quite sure to accomplish it. Also as an fyi I did use the Advanced Customation Wizard. Which built 3 .asp files, apologies, but I am quite a newb of this as I don't do it everyday, and what I am looking for is the first time I am asking for this.

  • 0 in reply to DKarkanica

    If you look at the tab on the Opportunity, this will link to a file called XXXXXXLis.asp which is the list for the new entity.  You will also see a new button that then allows you to create a new entity.  Let's assume you create a new record.  This will not show in the list.  That list page will list the newly created record and will have a link in the grid to the summary page.  Let's call that xxxxsummary.asp.  What you basically want to do is call xxxxxsummary.asp instead of xxxxxxList.asp.  You will have to play with the context information but that should be straight forward.

  • 0 in reply to Sage CRM

    Right, I was heading in the right direction awesome. I am struggling with the context information changes you mention above, or do you happen to have an example what changes are needed. This is the part of CRM I really struggle with.

  • 0 in reply to DKarkanica

    The change will be in the summary page.

    The wizard generated page contains lots of clutter.  Try and create you own simple page.  See:  www.sagecity.com/.../basic-code-structure-of-an-edit-page

  • 0 in reply to Sage CRM

    var myBlock = CRM.GetBlock('ProjectDetailsSummary');
    var myRecord = CRM.FindRecord('ProjectDetails','adpd_OpportunityId=20');
    CRM.AddContent(myBlock.Execute(myRecord));
    Response.Write(CRM.GetPage());

    I have this and am getting nowhere with it, I can only get a 500 Internal Error, even if I hard code it to s specific record. I am so lost with this. Don't suppose you have anything else that could help me understand this. ProjectDetails is my entity.

  • 0 in reply to DKarkanica

    Thanks Sage CRM for all your help with this. I ended up making use of the Summary page that was generated with the Advanced Customization Wizard.

    I added the following piece of code to the beginning of this page to get the custom table items ID to feed into the summary page.

    CurrentOpportunityID=CRM.GetContextInfo("Opportunity", "Oppo_OpportunityId");
    var GetProjDtlID = CRM.CreateQueryObj("SELECT TOP 1 adpd_ProjectDetailsID FROM [SOLAR_CRM].[dbo].[ProjectDetails] WHERE adpd_OpportunityId=" + CurrentOpportunityID + "", "");
    GetProjDtlID.SelectSQL();

    This was quite successful, in accomplishing what I needed to accomplish.

Reply
  • 0 in reply to DKarkanica

    Thanks Sage CRM for all your help with this. I ended up making use of the Summary page that was generated with the Advanced Customization Wizard.

    I added the following piece of code to the beginning of this page to get the custom table items ID to feed into the summary page.

    CurrentOpportunityID=CRM.GetContextInfo("Opportunity", "Oppo_OpportunityId");
    var GetProjDtlID = CRM.CreateQueryObj("SELECT TOP 1 adpd_ProjectDetailsID FROM [SOLAR_CRM].[dbo].[ProjectDetails] WHERE adpd_OpportunityId=" + CurrentOpportunityID + "", "");
    GetProjDtlID.SelectSQL();

    This was quite successful, in accomplishing what I needed to accomplish.

Children
No Data