Skip to Content
Author's profile photo Meghna Sharma

Pass Account ID from Account TI to Custom QC in Custom Tab

Hello All,

Here I am going to detail the steps to pass the Account ID from the Account TI screen to the Quick Create of a Custom Business Object. The instances in the Custom Business Object can be created from a new tab in Account TI added through an Embedded Component and only the instances related to the current Account will be visible. It’s an easy thing to achieve but requires quite a number of activities to be done. So let’s start with the steps……

Step1: Create the Custom BO

Create your custom BO “ZTestBO” as required and add the Account ID as one of the elements.

ZTestBO_BO.png

Step 2: Create the screens for Custom Business Object and Embedded Component.

Step3 : Add Business Object elements to Embedded Component

Add Advanced List Pane to the Embedded Component to add the desired fields from ZTestBO.

ZTestBO_EC2.png

Step 4: Configure the Inport, Query and New button in Embedded Component

In Embedded Component DataModel tab, right click on the Root and add a Structure “InportParameter” and a DataField “AccountID” inside the structure.

ZTestBO_EC_DataField.png

Create an Inport and add a Parameter named “AccountID” and bind to the newly created DataField. This DataField will hold the value of Account ID sent by the Outport of Account TI screen.

ZTestBO_EC_InportParams.png

Create a Query in the Embedded Component and select the corresponding DataList and bind the QueryByElements of ZTestBO. Click on the ZAccountID field in the QueryByElements and click on Add Parameter.

ZTestBO_EC_Query2.png

Bind the ZAccountID to the DataField “AccountID”. In this way we will be able to see only those instances from the ZTestBO in the Advanced List Pane which belong to the current Account which is open.

ZTestBO_EC_QueryParam.png

When the Query is created, an Event Handler is automatically created which executes the DefaultSet.

ZTestBO_DefaultSetEventHandler.png

Assign the same Event Handler to the Inport that was created in previous step. Also set the RequestAutoRefire and RequestFireOnInitialization properties to True.

ZTestBO_EC_DefaultSetEventHandler2.png

Enable the Toolbar for the Advanced List Pane in the Embedded Component and add a New button. Go to DataModel tab, select the ZTestBOInternalID in the DataList and in the properties set the ThingType Mode as “Static”. Select the Associated Thing Type as your ZTestBO’s TT from dropdown.

ZTestBO_EC_ThingType.png

Set the following properties for the New button.

Semantic: QuickCreate

Associated ThingType Container: Bind to ZTestBOInternalID from the DataList

ZTestBO_EC_NewButton2.png

Step 5:  Configure Quick Create Inport

In the Quick Create, add a parameter named AccountID to the already existing Inport “QuickCreate”. Bind the parameter with the ZTestBO element “ZAccountID”.

ZTestBO_QC_Inport2.png

This parameter will be used to get the Account ID from the Embedded Component. For that we need to add an Outport to the Embedded Component which will pass the Account ID to Quick Create.

Step 6: Configure Outport in Embedded Component

In the Embedded Component, add an Outport. Select the PortType Package as shown below which should be the same as the Inport of QC.

ZTestBO_EC_Outport2.png

Select the PortType Reference as ThingNavigation which is also same as QC. Add a parameter named AccountID. The name of the Parameter should be same as QC parameter. The Key is bound to the Alternative Key i.e., ZTestBOInternalID of the ZTestBO and the AccountID is bound to the DataField “AccountID”.

ZTestBO_EC_OutportParams.png

Step 7: Assign Inport and Outport to New Button

The Outport of Embedded Component and Inport of QC needs to be used in the Properties of New button so that whenever the new button is clicked the Outport from EC will send the Account ID to the Inport of QC.

ZTestBO_EC_NewButton3.png

Step 8: Add Embedded Component to Account TI

Now open the Account TI and go to Extensibility Explorer. Click on Undefined –> Add View with Embedded Component. Select the Embedded Component from your solution and provide a title.

ZTestBO_AccountTI_EC.png

Click on Bind, select the PublicOutportECCCustomerRoot of Account TI and Inport of Embedded Coponent and bind the AccountID parameters.

ZTestBO_AccountTI_params binding.png

Step 9: Test it

Assign the WCView of ZTestBO to your user to enable the New button and we are ready to see it working!!!!

ZTestBO_Working.png

Thanks & Regards,

Meghna

Assigned Tags

      20 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Thanks Meghna Sharma,

      This is really wonderful document..... 🙂

      Regards,

      Mithun

      Author's profile photo Meghna Sharma
      Meghna Sharma
      Blog Post Author

      Thanks 🙂

      Author's profile photo Sowmya Tammadihalli
      Sowmya Tammadihalli

      Thank you Meghna for the detailed document 🙂 .

      Thanks and Regards,
      Sowmya

      Author's profile photo Chandan Bankar
      Chandan Bankar

      Thanks for sharing this detailed information! 🙂

      Cheers,

      Chandan

      Author's profile photo mani kanta
      mani kanta

      Can we be able to call the actions of Custom BO approval process from extended BO?

      Do you have any idea about this?

      Regards,

      Mani

      Author's profile photo Former Member
      Former Member

      Hi Meghna Sharma

      We have a requirement where Address fields available in Account TI needs to be shown in Accounts QC and QV standard screens. Is there any standard means to show this or do we need to follow extension object approach?

      Author's profile photo Meghna Sharma
      Meghna Sharma
      Blog Post Author

      Hello Saruchi,

      Address fields are already available in QC screen. You can go to personalize and add those.

      Thanks & Regards,

      Meghna

      Author's profile photo Former Member
      Former Member

      Hi Meghna,

      Thanks for sharing this useful blog to us.I have a similar kind of requirement as like the above thread.

      I have a custom BO and I have to create standard opportunity in my custom BO's opportunity tab when I click new and also need to pass few fields from the custom BO to the QC of opportunity(like create with reference).

      In order to achieve this what is the best approach.How to use the standard QC inside my custom BOs tab and also I need to show only the Opportunities related to my custom BO only.

      If you need this as a new discussion I will post it as a question also.

      Regards,

      Arjun

      Author's profile photo Former Member
      Former Member

      Hi Meghna,

      Very useful document.

      I have a similar requirement where we need to add custom button in Activity->Phone Call screen. When we click on this custom button Quick Create for opportunity should open and in Account field the Account name should come by default.

      I have done with the Custom button and Quick Create. But I am not getting the Account value by default.

      Please help me in that. I am sending you my screen shot.

      Capture.JPG

      The Account name should come in the highlighted place..

      Thanks,

      Komal

      Author's profile photo Saurabh Kabra
      Saurabh Kabra

      Very nice blog 🙂

      Author's profile photo Benny Huang
      Benny Huang

      Hi Meghna Sharma,

      When I follow the step as the blog, after I configured the button, the button cann't display at the screen.

      where is the mistake?

      Thanks a lot.

      Benny

      Author's profile photo Benny Huang
      Benny Huang

      Hi Meghna Sharma,

      I do the step of the EC component again, the same result, I cann't display the button.

      The button, first, I set the "Use Integrated ToolBar" to true.

      second, I set the "UseToolbar" to true.

      and configure the property of the button as the bolg.

      Is it OK?

      Thanks  a lot.

      Benny

      Author's profile photo Johannes Schneider
      Johannes Schneider

      Hello Benny,

       

      i have the same problem as you have but it is not the button's propertie which ich hiding the button, it is the Associated ThingType which doesnt work.

      If you have any solution for this problem yet, it would be nice if you are able to provide them to me.

       

      Kind Regards,

      Johannes

      Author's profile photo Johannes Schneider
      Johannes Schneider

      I found out why what you need to do again 🙂

      Just assing thw WorkCenterView rights to your User.

       

      Kind Regards,

      Johannes

      Author's profile photo Benny Huang
      Benny Huang

      Hi Johannes,

      Thanks a lot.

      I had assigned the WorkCenterView rights to user as the blog, I can access the WorkCenter of the custom BO.

      Could you tell me where need I do for the rights?

      Best Regards,

      Benny

      Author's profile photo Johannes Schneider
      Johannes Schneider

      You should now be able to see the Quick Create button in the EC, thats why you need the access rights.

       

      Kind Regards,

      Johannes

      Author's profile photo Benny Huang
      Benny Huang

      Hi Johannes,

      Thanks a lot.

      But it can't display the button, I try some times.

      When add a button, it can display.

      If I change Semantic from "none" to "QuickCreate", and change Associated ThingTypeContainer from null to "/Root/DataList/ZTestBOInternalID". It can't display. It's strange.

      Best Regards,

      Benny

       

      Author's profile photo Johannes Schneider
      Johannes Schneider

      Hi Benny,

      thats not strange it has something to do with the assciation to the ThingType of your screen scenarios.

      Just again go setp by step through the guide but this time add the step of assinging the WorkCentreView to your Business Users.

       

      If ti still doesnt work I cant help you out further anymore, for me this worked.

       

      Kind Rgeards,

      Johannes

      Author's profile photo Robin Van Hoof
      Robin Van Hoof

      Hello Bin,

       

      I'm currently encountering the exact same problem. Have you found a solution yet?

      Author's profile photo Cuong Nguyen
      Cuong Nguyen

      Could you please help me how to get this step? I can't find any screen to jump into:

      In the Quick Create, add a parameter named AccountID to the already existing Inport “QuickCreate”. Bind the parameter with the ZTestBO element “ZAccountID”