cancel
Showing results for 
Search instead for 
Did you mean: 

Change Status of Ticket in C4C using SDK.

prat2
Explorer
0 Kudos

Dear Experts,

We would like to change the status of Ticket to "In Progress" when the Survey feedback answer is "Yes"

I write my code in

"Business Object: Questionnaire"

"Node: ValuationCollection"

"Event: BeforeSave"

With Code "this.ServiceRequest.RejectSolution();" , I get an error "Access of member 'RejectSolution' in a cross-deployment unit is not possible"

I cannot Add Deployment Unit for the Extended Business Object.

Also for I want to use "this.ServiceRequest.SendBackForRevision();" in the same event.

Error : Approval functions can only be called within script files of approval actions.

If Someone knows the ways to solve this, please share

Thank you

Kind regards

Prat

Accepted Solutions (0)

Answers (2)

Answers (2)

douglas_rohmann
Employee
Employee

Dear Prat,

To avoid this issue, you can try creating a reuse library to update the Service Request BO. In a reuse library,

it should be possible to bind every function to a deployment unit. In this way you should be able to put your function in a different deployment unit from the one where you are developing the solution on and then call it via Event-Before-Save.


Best Regards,
Douglas Rohmann

prat2
Explorer
0 Kudos

Hi Douglas,

Thanks for the reply, still I am not clear with the approach.

so according to you in the Event-BeforeSave of "Business Object: Questionnaire" and "Node: ValuationCollection"

I execute

SetServiceRequestInProgress(this.ServiceRequest) // SetServiceRequestInProgress is Function in Reuse Library

see the screenshot below

I dont see any function in the list.

Please guide.

Thanks

Prat

0 Kudos

Hi Prat,

You can also take a look at this - the description of the way how to communicate across different deloyment units

http://blog.acorel.nl/2018/05/cross-deployment-unit-object-creation.html

Regards,

Alexey