cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Extend customer functionalities in UI ( SAP Customer Checkout)

Former Member
0 Likes
786

Hello,

Welcome, I wanted to ask if you know how to overwrite, extend customerDialog.js. There is no access to it from the window level, and it is generated only on document ready page. @JSInject(targetScreen="sales") , does not help overwrite customerDialog.js. Standard extend javascript function does not work because it has no access. Help how to edit/modify the file?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

Hi Tomasz,

Have you already tried to handle 'dialogopen' event:

$("#dialogCustomer ").on("dialogopen", function (event, ui) { console.log('opened'); $("#lastNameInput").hide();  });

If you need to have more control, i.e. check if the dialog is in edit mode you might want to detect attribute change event on one of the fields existing on the dialog - check 'disabled' attribute.

Kind regards,

Radek

R_Zieschang
Active Contributor
0 Likes

Hi Tomasz,

sorry for the late reply. This is imho not possible in a "API" way in cco. What you could do (did not test it myself, but dont hesitate to give feedback):

Using monkey-patching to override third party javascript.

http://me.dt.in.th/page/JavaScript-override/

Another way would be intercepting the click event on the "new" Button in the customer dialog and creating this form all by yourself and register the same events on your own dialog as registered on the CCO dialog (e.g. click on the save button to save the newly created customer,...).

hth

Kind regards

Robert

R_Zieschang
Active Contributor
0 Likes

Hi Thomas,

short question:

What do you want to achieve?

Kind regards

Robert

Former Member
0 Likes

Hi Robert,

Hi, I would like to add/hide/blocked fields from the variable customerDialog_allFields or customerDialog_editableFields in new customer form. Disable non company option. Load data on the basis of VAT number from API if online access is available for example

Kind Regards

Tom