Mark Peeters
Read all my blogsFor this blog this field is a specific date type, contract start date, which needs to be visible on item overview. This field is only available in the assigment block Dates.
Step-by-step
The following steps need to be executed in the Component Workbench.
- Find the correct component by using F2 in the CRM UI.
- Enhance the Component ( For our example BT140I_SRVP).
- Enhance the view ( For our example BT140I_SRVP/Details) by right clicking on the view and selecting enhance.
- Create a new context node by right clicking on the folder context nodes.
- Name: Sonething with Cont Start
- Link the BOL Entity BTDate
-
In the Define Dependency screen fill
-
The link to BTADMINI for item (or BTADMINH for header)
-
In the BOL Relation field select the relation to the desired date type (Contract start)
Completing the wizard will create a context node for your component. This new context node is however not linked directly to the correct super class. To change the Super Class of the created Context Node dubbel click on the name of the implementation class (like ZL_BT140I_S_DETAILS_CN01) of your newly created context node.
We need to modify the ON_NEW_FOCUS method to below code.
method ON_NEW_FOCUS.data: lv_collection type ref to if_bol_bo_col.lv_collection = cl_crm_uiu_bt_date_tools=>on_new_focus( iv_focus_bo = focus_boiv_level = ‘I’iv_date_type = ‘CONTSTART’iv_category = ‘T’ ).me->collection_wrapper->set_collection( lv_collection ).endmethod.
Pass the’ I ‘for Item, ‘H’ for Header
Pass the Date Type defined in the date profile
Pass the category as T for Dates.
Now we need to add the newly created context node as a field to the configuration of the component.
You can find the new context node in the available fields section.
The field that you need to select to display a date is `Current date´.
6 responses to “Adding a date type to the item overview page”
Hi,
Can you pls. provide the step by step using AET?
Regards,
Theresa
Violet,
There is an article on AET on this blog.
http://blog.acorel.nl/2011/08/adding-custom-fields-to-screen-using.html
If you have further questions, feel free to ask.
The article is very nice, i have a small question. how did you know about the class CL_CRM_UIU_BT_DATE_CN and how did you make that as super class. I face a problem wherein i dont know the exact super class to be used like you have done here. Is there a guide on such classes and which has to be used when or atleast where i know what all standard classes are there like this one which you have used here.
Dear anonymous,
In this case, we copied this from one of the standard fields from the context node.
I am not aware of any documentation on these classes in particular.
If you happen to find some though, feel free to comment again 🙂
Thanks,
Pieter
Hello,
Do you know if there is a way to do something similar to link a field that is not part of a BOL Entity BTDate such as the Opportunity Closing Date (EXPECT_END) with the Dates assignment block?
Thanks,
Clinton
I ended up creating an explicit setter for EXPECT_END and updated a specific date type.