Hello, I would like change data before save the record. For this with before saving i use calljob plugin. I know to return error message using outparameters variable output_report, but i don't know how to change data? Someone speak me about output_item can be used since 5.1 but i found nothing about it? Regards.
Hi, Yes, using a output_item allows you to change the record being saved (since 5.1). You need both output_report *and* output_item in this case: the output_report is used by MDM to control whether beforeSaving process succeeded or not. Please keep in mind security is checked again on the record in output_item: MDM will discard changes the user is not allowed to perform.
Hi, Two things: 1) You need two jobs in your beforeSaving process, one to return output_report , one to return output_item. 2) output_item - the xml message you return from your job has the same schema as an MDM exchange message - i.e. if you use tMDMTriggerInput and look at the structure of the message provided by MDM, this will give you an idea of what to return to MDM. You only need to return /exchange/item which is the section that contains the actual data of your entity, /exchange/report is not mandatory. Hope that helps!