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

Make product entry mandatory when creating an Opportunity

chrigu1
Participant
0 Kudos
754

Hi experts,

I am facing a business requirement for SAP Sales Cloud where I am looking for the recommended approach.

Business would like to have the product entry in the opportunity creation window a mandatory field so that it is not possible to create/save an opportunity without assigning at least one product.

I already enabled the product entry according to the following blog: https://answers.sap.com/questions/187643/how-do-i-make-visible-adding-products-during-oppor.html

Would be glad if someone could give me a hint on what's the best way to approach this requirement.

Regards Christopher.

Accepted Solutions (1)

Accepted Solutions (1)

former_member422907
Contributor
0 Kudos

Hi,

here are this lines of code:

if (!this.Item.GetFirst().IsSet()){
raise MsgOpportunitytMessage.Create("E", "There are no products in the opportunity, Please enter at least on product!");
}

locate them in Opportunity-Before Save event

br,

Zoran

chrigu1
Participant
0 Kudos

Hi Zoran,

thanks a lot for your detailed solution proposal. Now I will have to get familiar with PDI and put your answer into practice.

Regards,

Christopher.

Answers (2)

Answers (2)

former_member422907
Contributor
0 Kudos

It is very simple check in PDI. Just couple of lines of code 🙂

br,

Zoran

former_member422907
Contributor
0 Kudos

hi,

The easiest way is make PDI coding in Before-Save event for opportunity XBO.

br,

Zoran

chrigu1
Participant
0 Kudos

Hi Zoran,

thanks for your prompt reply. I thought this is going to be the answer to my question but was wondering if there are any other ways to reach the same result.