CRM Bol programming Make fields editable and display only

CRM Bol programming Make fields editable and display only

This blog explains how to Control CRM UI elements to edit /display using CRM BOL programming & Control the UI property.

CRM Bol programmings Make fields editable and display only

Introduction

This article covers the basics of how you could control the UI element using CRM bol programming. We will discuss more about 5 sections of how you could control the UI element using CRM bol programmings.

The UI element using CRM bol programmings has been divided into these 5 sections where

  1. Requirement
  2. Then find the UI component
  3. Opening the corresponding UI component from the backend
  4. Then find relevant technical objects to modify
  5. Code changes to make the field display only or editable

Requirement: Disable a UI element on

For the customer overview screen, when the user clicks on edit to update the address information CRM Bol programmings Make fields editable and display only

Find the UI component in CRM BOL programming.

Right-click on the specific field and then press F2, and then you will be able to see the technical details. Make a note of the UI component and View as below UI Component is BP_ADDR, and View is BP_ADDR/AccountCommNumbersEL CRM Bol programmings Make fields editable and display only

Open the UI component in the backend

Use transaction obsp_wd_cmpwb to be able to open the component in the backend CRM system. Then enter the component found above as BP_ADDR. You can use an existing enhancement or create a new one. In my case, I am using an existing enhancement as ZCRM. CRM Bol programmings Make fields editable and display only Find the UI component and View associated with it It shows the different view components as seen below In order for us to change the section for communication then, we need to focus on the controller implementation class Implementation Class ZL_BP_ADDR_ACCOUNTCOMMNUM_IMPL And View layout AccountCommNumbersEL.htm CRM Bol programmings Make fields editable and display only

Find relevant technical objects to modify in CRM BOL programming

If you have never used the UI object above, then the methods would need to be redefined in my class. I already used the class before, so there is no need to redefine hence using the class ZL_BP_ADDR_ACCOUNTCOMMNUM_IMPL. CRM Bol programmings Make fields editable and display only This is one of the important classes which has a method DO_PREPARE_OUTPUT where you can control to make the view editable or display only Class time in a bol entity for implementation is of the type CL_BSP_WD_VIEW_CONTROLLER In this class, you get attributes by default which you can use to control the context behavior For this case, we would be using VIEW_GROUP_CONTEXT CRM Bol programmings Make fields editable and display only This further reference an associated interface IF_BSP_WD_VIEW_GROUP_CONTEXT CRM Bol programmings Make fields editable and display only

Code changes to display /edit the section

The below code was added in method DO_PREPARE_OUTPUT me->view_group_context->set_all_display_only( ).. Breakpoints can be set, and after changes, you will notice that you are still able to edit the BP header section CRM Bol programmings Make fields editable and display only Let’s add an additional line of code that says me->zaddress_display = ‘ ‘. CRM Bol programmings Make fields editable and display only Now when the program runs, it is able to show the field as display only. CRM Bol programmings Make fields editable and display only The additional setting is to create an attribute in the class CRM Bol programmings Make fields editable and display only This attribute value is  passed on the BSP page below CRM Bol programmings Make fields editable and display only Then the code should say: display mode           = “<%= controller->zaddress_display %>” CRM Bol programmings Make fields editable and display only To make all fields editable below then, you should use me->view_group_context->set_all_editable( ). me->zaddress_display = ‘ ‘. After that, the HTML page, the value of Zddress, would now be passed as Blank, making the field editable. To read more: https://blogs.sap.com/2019/10/07/crm-bol-programming-basics-of-how-to-control-display-property/

Proud Blogs that
make us stand
out

Security policy Recent Home

Uncategorized

Security policy

Optimize Dynamics CRM Customizations with goal management—set, track, and achieve business objectives using deal, task,…

Delegation for Business Central Recent Home

Uncategorized

Delegation for Business Central

Business Central Delegation Manage Approval Delegations Mark user as out of office and add start…

Thinking about a project? Get in touch with us.

Connect with Us Today through the Details Below or Fill
Out the Form for a Prompt Response

Book Free Consultation

Guaranteed response within 8 business hours.





    Trusted by Startups and Fortune 500 companies

    07+ years of experience

    We can handle projects of all complexities.

    100+ satisfied customers

    Startups to Fortune 500, we have worked with all.

    20+ in-house team

    Top 1% industry talent to ensure your digital success.

    Sign-Up to Become a Partner with uKnowva

    Benefits for Partner

    Acquire new customers and earn Steady Monthly Revenues.

    Our commission system will provide you with Competitive Revenue Streams.

    Add value to your customer with world-class HRMS Solution.

    Leverage uKnowva – A One-Stop HR Portal by scaling to global Clientele.

    Deliver Automated HR Solutions for a holistic digital transformation of customer’s HR processes.

    Get Started