fetch and update the transaction body feild in SCA

For getting the custom transaction body in the checkout we need to add the transaction body field id to the configuration record. The screenshot is added below

For getting the value in checkout the code is added below

this.model.get('custbody_ra4madi_order_email_sent')

Fo setting the value of the transaction body field the code is added below

var data = {
									fieldId: "custbody_ra4madi_order_email_sent",
									type: "number",
									value: parseInt(options.Reward)
								}
								cart.setTransactionBodyField(data).then(function () {
									self.render();

								}).fail(function (error) {
									self.errorMessage = Utils.translate('Error Required');
									self.render();
								});

Leave a comment

Your email address will not be published. Required fields are marked *