Let's Reconnect, thank you for making 2022 our best year yet.

Look Back
Update operation on BO fails — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Update operation on BO fails

Received Response
16
Views
1
Comments
edited Apr 11, 2018 7:00AM in Visual Builder 1 comment

Summary

Update operation on BO fails

Content

Hey,

 

I'm trying to perform an update operation on the data of a Business Object. But it fails.

 

Can anyone please help with  this?

 

require([

    'operation/js/api/Conditions',

    'operation/js/api/Operator'

], function(Conditions, Operator) {

    var so = Abcs.Entities().findById('SearchAccount');

    var SendFlag = so.getProperty('sendToEloqua');

    //var condition = Conditions.SIMPLE(SendFlag, Operator.EQUALS,'Y');

    var operation = Abcs.Operations().update({

  entity: so,      

  record: {

   sendToEloqua: 'N'     

  }

});

   operation.perform().then(function(operationResult) {         

  if (operationResult.isSuccess()) { 

   alert("Updating Contact");

   operationResult.getData().forEach(function(oneRecord) {

  

    resolve("ok");

   });

        }

 

}).

  catch(function(operationResult) {

        if (operationResult.isFailure()) {

            // Insert code you want to perform if fetching of records failed

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!