Creating a Tab to Show Related Company Opportunities

CRM 6.2.i

The word has been passed down to me that in addition to the opportunities tab in a company; an engineering tab needs to be added.

Management LOVES the pipeline (you can see some of my other posts of projects that I need to get done) and in our business, opportunities have the customer and the engineer that we work with. Both customer and engineer are in our companies (separated by company type, ie. "Customer" and "Engineer").

When I click on a company, I can currently click on the opportunities tab to see all the opportunities tied to that company. What I need is another tab that shows opportunities (and if possible a pipeline) where this company has been selected as an engineer.

When you click on the tab, you get a list of opportunities that have this Company as the engineer company.

To go about this, I first created a field in the Opportunity Entity. The field is called oppo_testengcomp, and it’s a search select advanced on the company so I get all our companies.

Now when an opportunity is made, they can select the company as an engineer. Next, I created a view in the Company Entity.

This returns all the opportunities with this new field populated. Now I created the list, and used the view. This is going to have a few more fields, but right now I tossed in these.

Then I created the block. It’s a list block.

And finally I created the tab to show this block, so under Tabs I created a new one with runblock and set it to the block I just created.

Now I haven’t gotten to the pipeline, but for the time being I just want this list up. What I found out was that it’s based on the primary company, not the company selected as the engineer. So if the Company selected is called "Testcomp" and in the opportunity that oppo_testengcomp I select "Engcomp" this opportunity is listed under the Engineering Opportunities tab of the company Testcomp, and not the company Engcomp that it should be displayed.

Any thoughts?

  • 0

    Amend your view, something like: -

    SELECT oppo_testengcomp as comp_companyId,Opportunity.*,Comp_Name

    FROM COMPANY

    LEFT JOIN Opportunity on oppo_primarycompanyId = comp_companyId AND oppo_deleted IS NULL

    WHERE comp_deleted IS NULL

    Just add all the fields you need, just don't add the actual comp_companyId, as it is aliased already. Add any other clauses you want.

    Pipeline, I think you would have to write a whole new .asp page to display this.

  • 0

    Ah! So you're making it think that the primary company is the testengcomp instead of the company that is selected! Brilliantly sneaky!

    I wouldn't know the first thing about how to create, save (name/location), or implement an .asp file, but it sounds like fun! (Besides I'll need to learn how to do something if I want to change the pipeline summary information.