cancel
Showing results for 
Search instead for 
Did you mean: 

CRM_ORDER_MAINTAIN Adding Texts

michael_habermueller
Participant
0 Kudos

Hello,

I am using crm_order_maintain to create and modify opportunities. (PartnerFunction, Customer_h, Opport_h, etc.)

Now I want to pass text information to the opportunity.

Debugging the online transaction helps me to fill the text table and the input fields, when adding text to an existing one order object.

But I am not sure how to fill the logical key in the input structure, when creating the oppi, when no GUID is present, when I only have the REF_Handle ?

Regards

Michael

Accepted Solutions (0)

Answers (1)

Answers (1)

michael_habermueller
Participant
0 Kudos

Hello,

the main issue in the problem, is the lack of a guid when creating a new one-order object. A temporary handle is sufficient for most other extensions and sets, but not for providing new text objects to a new order.

In addition, for every set, which is provided in the input parameters of CRM_ORDER_MAINTAIN, I have to distinguish between passing a guid and passing a handle.

To get rid of these coding and to pass the text, I use the following pattern:

1. A first call to CRM_ORDER_MAINTAIN that only fills the ORDERADM_H Structure. With this, a Guid is provided in the exporting parameter.

2. A second call to CRM_ORDER_MAINTAIN, which contains all other Extensions and Sets. The relationships are built up using the GUID from step 1.

3. CRM_ORDER_SAVE to persist the Order.

I think the additional second call to CRM_ORDER_MAINTAIN, is worth the effort, to get lean code to provide the other extensions.

Regards

Michael