cancel
Showing results for 
Search instead for 
Did you mean: 

My Leads front end service mapping

raina_goyal
Participant
0 Kudos

Hi Experts,

I am extending My Leads Fiori App(CRM) and adding new icon tab on s3.view.xml.

I want to show sales area details in the icon tab as form.

The code for extension tab is :

<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core"

    xmlns:ui="sap.ui.layout.form">

  <IconTabFilter id="SalesAreaDetails" text="Sales Area Details" icon="sap-icon://sales-order">

     <content>

    <ui:SimpleForm id="SalesData">

     <ui:content>

  <Label id="SalesOrg_label" text="{i18n>SALES_ORGANISATION}"></Label>

  <Text id="lead_SalesOrg_text" text="{json>/SalesOrganisation}"></Text>

  </ui:content>

  <ui:content>

  <Label id="DisChannel_label" text="{i18n>DISTRIBUTION_CHANNEL}"></Label>

  <Text id="lead_DisChannel_text" text="{json>/DistributionChannel}"></Text>

  </ui:content>

     <ui:content>

  <Label id="Divison_label" text="{i18n>DIVISION}"></Label>

  <Text id="lead_Division_text" text="{json>/Division}"></Text>

  </ui:content>

               <ui:content>

     <Label id="SalesGroup_label" text="{i18n>SALES_GROUP}"></Label>

  <Text id="lead_SalesGroup_text" text="{json>/SalesGroup}"></Text>

  </ui:content>

     <ui:content>

     <Label id="SalesOffice_label" text="{i18n>SALES_OFFICE}"></Label>

     <Text id="lead_SalesOffice_text" text="{json>/SalesOffice}"></Text>

  </ui:content>

     </ui:SimpleForm>

     </content>

  </IconTabFilter>

</core:FragmentDefinition>

Here, I am able to show the labels but i am not able to get the data for the particular labels.

Also, when i am debugging and checking the service, i am able to get the data in the service. It is shown below:

Kindly Help,

Warm Regards

Raina Goyal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Raina,

I don't think you need to extend the controller for this implementation, controller is used in conditions where you have to handle some events, this can be accomplished without extending the controller.

Thanks and Regards

Hardik Bhardwaj

agentry_src
Active Contributor
0 Kudos

Thread is now locked as there is another thread on the same topic.  Cross Posting is a violation of the Rules of Engagement (see the Getting Started link at the top of each SCN page).

Regards, Mike (Moderator)

SAP Technology RIG

karthikarjun
Active Contributor
0 Kudos

Hi Raina,

Go to console---> write sap.ui.getCore().getModel("json")----> find your records are available or not?

Thanks,

Karthik A

raina_goyal
Participant
0 Kudos

Hi Karthik A

I have already tried this statement  and it always says "undefined".

Thanks and Regards

Raina

karthikarjun
Active Contributor
0 Kudos

Hi Raina,

Yah, Problem occurs here.

In your fragment you are using json (<Text id="lead_DisChannel_text" text="{json>/DistributionChannel) model to bind your records.

Solution:

Go to your service call---> under success block---> collect your records ----> put it in JSON model----> Bind that model to your fragment/view/core.

for ex:

var jsonModel = new sap.ui.model.json.JSONModel(your records);

this.getView().setModel(jsonModel);

Thanks,

Karthik A

raina_goyal
Participant
0 Kudos

Hi Karthik A

Do i need to extend the controller for this?

Thanks and Regards

Raina

karthikarjun
Active Contributor
0 Kudos

yah, if {json>yourvalue> this model returns undefined.

you need to extend controller.

Thanks,

Karthik A

raina_goyal
Participant
0 Kudos

Hi Karthik A

I have extended the controller and have bind the json model in it , but still i am not able to resolve my problem.

Kindly advice.

Thanks and Regards

Raina

karthikarjun
Active Contributor
raina_goyal
Participant
0 Kudos

Hi Karthik,

I just noticed that when i click on the tab "Sales area", it does not hit any back-end service.

Also the data is defined in the "Lead" entity and there is no entity for this tab.

How to map that service to this tab?

Kindly advice

Raina

gill367
Active Contributor
0 Kudos

Hi Raina;

As suggested in the thread please update the mentioned function.

Also please avoid raising duplicate threads for same issue or discussion. I would request you to close one of them.

Regards,

Sarbjeet Singh

Former Member
0 Kudos

Hi Raina,

I am facing a similar challenge while extending a CRM application, so if you get any solution please share it with me as well.

Thanks & Regards

Hardik Bhardwaj