Skip to Content

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

To report this post you need to login first.

18 Comments

You must be Logged on to comment or reply to a post.

  1. 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

    (0) 
  2. SARUCHI PATHELA

    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?

    (0) 
    1. Meghna Sharma Post author

      Hello Saruchi,

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

      Thanks & Regards,

      Meghna

      (0) 
  3. Navin Kandasamy

    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

    (0) 
  4. Komal Choudhary

    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

    (0) 
    1. 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

      (0) 
      1. 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

        (0) 
        1. 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

          (0) 
            1. 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

               

              (0) 
              1. 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

                (0) 

Leave a Reply