Skip to Content
0

Data does not save on MDR job

Nov 01, 2016 at 04:20 PM

102

avatar image

Hello,

When I run MDR job and if there is any error in one of the record, the other record values are not getting saved. Can you please help me how can I overcome this issue? I'm using query.Execute() method and updating the record values in the loop. Should I need to use ExecuteFromDB()?

Thanks.

Regards,

Mohan Babu

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Pradeep Kumar N
Nov 02, 2016 at 02:50 AM
0

Hi Mohan,

MDRO executes the action and then save, which means if there is any error in the action execution, none of them would be saved.
To solve your issue, either fix the errorneous record or enhance your query parameter to filter out such errorneous record.

Thanks, Pradeep.

Share
10 |10000 characters needed characters left characters exceeded
Horst Schaude
Nov 02, 2016 at 08:32 AM
0

Hello Mohan Babu,

Why do you call a query manually in a MDRO? This makes the complete process nonsense. :-( :-( :-(

A MDRO is defined UPON a query and for every query result the resp. action is called.
There is no need for calling a query or an action manually. If you do so, you will lose all advatanges of the MDRO framework, like parallelism,...

Bye,
Horst

PS: I need to write a blog on that. ;-)

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hello Pradeep / Horst,

Thank you for your responses. My scenario is that I need to update Service Request ticket fields based on some logic. So I would like to get the ticket information. I'm getting all the tickets by querying the standard object and looping over to update the extension fields.

Regards,

Mohan Babu

0

Hello Mohan,

Is there a chance for you to have a shadow BO for every ServiceRequest instance?
Because you can enhance the ServiceRequest BO with an action (running on C4C), but you can not define a MDRO on it.
This shadow object needs to carry the query and the action for the MDRO.

HTH,
Horst

0

Hello Horst,

I'm actually having a custom BO for all the tickets and then querying the data in action and updating the tickets.

Regards,

Mohan Babu

0
Pradeep Kumar N
Nov 08, 2016 at 02:35 AM
0

Hi Mohan Babu,

In the loop when you modify, the changes are not yet saved, all the changes are saved at once, hence if there is any error everything gets rolled back.

If you want to save for earch iteration in the loop, then you could execute webservice in the loop.

Thanks, Pradeep.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Pradeep,

Do I need to create custom web service or is there any standard web service that I can use?

Thanks.

Regards,

Mohan Babu

0
Pradeep Kumar N
Nov 12, 2016 at 09:49 AM
0

Hi Mohan,

You could search in the Repository explorer under Inbound service interfaces, if not found you could create one.

Thanks, Pradeep.

Share
10 |10000 characters needed characters left characters exceeded