cancel
Showing results for 
Search instead for 
Did you mean: 

Create visit from the sales order in C4C

luis_montalti
Explorer
0 Kudos

hello experts..

Can you create a visit from a sales order?

For example, depending on the status of a field, when saving the sales order, is the visit automatically generated?

regards

Lucho Montalti

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member226
Employee
Employee
0 Kudos

Hi,

This is error is due to the fact that Visit needs to contain atleast owner party role by standard and when this is not passed from ABSL then this error appears.

I tried to simulate a very basic visit using following snapshot and it got created without any error:

Thanks
Saurabh

import ABSL;

import AP.PC.ActivityManagement.Global;

var act = Activity.CreateWithReference(this,"2054");

act.SubjectName = "From SO";




var visitDuration = Duration.ParseFromString("P3D");

act.ScheduledEndDateTime.content = Context.GetCurrentGlobalDateTime().AddDuration(visitDuration);

act.ScheduledStartDateTime.content =  Context.GetCurrentGlobalDateTime();




var actParty = act.Party.Create();

actParty.PartyUUID = UUID.ParseFromString("00163E1851711ED6AB912872BEC66BE2");  // Employee Business Partner UUID

actParty.RoleCode ="39";



luis_montalti
Explorer
0 Kudos

Hi,

keep sending me the message. ((BUSINESS ACTIVITY, ROOT) Error when reading party scheme configuration)

some kind of configuration i don't see?

Thanks,

Lucho

luis_montalti
Explorer
0 Kudos

Hi,

keep sending me the message. (BUSINESS_ACTIVITY, ROOT) Error when reading party scheme configuration

some kind of configuration i don't see?

Thanks,

Lucho

former_member226
Employee
Employee
0 Kudos

Hi,

By standard functionality, it is not possible to create visit upon save of a sales order. However, you can do the same using custom PDI logic where you can check the status of order and create visit from ABSL upon save of order.

Thanks
Saurabh

luis_montalti
Explorer
0 Kudos
Hi saurabh kabra
When creating the visit from sales quotes:

var visit = Activity.CreateWithReference(this,"2054");
visita.SubjectName = "Entrega de Mercancía";


// fecha + hora inicio (no toma valor hora am)
visita.ScheduledStartDateTime =  fechaEntregaDeseada;
// fecha + hora fin (no toma valor hora am)
visita.ScheduledEndDateTime = fechaEntregaDeseada;
visita.oficinaDeVentas = OficinaVenta;

and when executing I receive the following message: "Error when reading party scheme configuration; please report an incident."
what am I doing wrong.
screenshot-2.png.
thank you very much
regards

Lucho Montalti