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

Modify/Add C4C Visit description generated from Routes

aris_hidalgo
Contributor
814

Hi Experts,

Currently, Visits generated from Routes (Action->Generate Visits) will always have a default description of 'Visit' + <Account name>. We want to change this by letting the users put in their Visit description (subject if you will) prior to the Visit generation/creation in Routes. Thanks a lot!

Accepted Solutions (1)

Accepted Solutions (1)

former_member226
Employee
Employee

Hi,

As confirmed by Prasanth currently it is not possible out of the box to maintain visit description for a generated visit right in "Route" UI.

However you can implement a very simple solution in order to achieve the same via PDI/SDK. Steps are as follow:

1. Create a BO extension for "Route" BO and add a extension field in Account node: (You can also do the same via KUT and reference it via CustomerRefenceFile in PDI but since I knew that we would need this in PDI hence I created the field directly via PDI)

route-xbo.png

node Account {
[Label("Visit Description")] element GeneratedVisitDescription: MediumText;
} 

2. Add the field to standard TI screen /BYD_COD/SalesOnDemand/Visit/VisitRoute/Route_TI.TI.uicomponent.

ui-extended.png

3. Create another BO extention for "Activity" BO and generate a AfterModify event script. Add following piece of code there. This code will only execute for Visit where CustomField(from step 1) is maintained and copy the same value to the standard field for Visit Description.

absl-code.png

import ABSL;

if(this.TypeCode == "12" && this.GroupCode.content == "0027") // Visit
{
	if(this.VisitRoute.IsSet() && !this.VisitRoute.GeneratedVisitDescription.IsInitial())
	{
		this.SubjectName = this.VisitRoute.GeneratedVisitDescription;
	}
}

Thats it! You are ready to generate the visit with the user-entered visit description in Route UI.

Thanks

Saurabh

aris_hidalgo
Contributor
0 Kudos

Thank you Saurabh. This solved my problem.

Answers (1)

Answers (1)

PrasanthArya
Product and Topic Expert
Product and Topic Expert
0 Kudos

The feature described is not available in the current release of SAP Cloud for customer.

An alternative option may be to check the SAP Hybris Cloud for Customer Ideas Forum to submit an idea: https://influence.sap.com/SAPCloudforCustomer.