on 2023 Mar 31 8:58 AM
Hello Expert,
I need your help and guidance.
I have limited knowledge of scripting language. I do not understand some syntax and code written in the default template. I want to know more about it and where I Can get more detail about it.
I am trying to add some custom code on the Quote section "Item Table" by modifying the default template. When I open the default template under "Setup -> UI Design -> Responsive Template" I added a new custom template as below.
Below is the default Template code screenshot. I have limited knowledge of "Knockout JS" but I do not understand the first 2 lines. Are they part of "Knockout JS" or some other script language?
"@using WebSite.Models"
"@model CartItemTableViewModel"
I want to change some column head name base on some conditions in the below code.
I do not know which script language it is and from where I can get more information or more detail on how to use it or what are the different classes, and methods we can use.
@foreach, "CartItemColumnVm", "Model.Columns"
If you guide me or help me from where I can get more information on Model.Columns, CartItemColumnVm, @foreach, and other similar codes they have sued in standard templates.
I really appreciate your suggestion or guidance.
Thanks in advance.
Krish.
Request clarification before answering.
Razor
It is markup that evaluates server side
SAP CPQ Help page mentioning it below:
You can search online for 'Razor @model' or 'Razor @using'for more context on those.
Frankly a lot of the UI template customization work can be done without much worrying about Razor and just learning at a pseudo level from comments in the templates.
An SAP Help link example of this for the columns and complex columns (Columns with another row that breaks them down as sub columns (list price with NRC and MRC under it as sub-columns for example) below:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
3 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.