Useage of a!writeToMultipleDataStoreEntities in sail forms

Hello Everyone!

 

So I am trying to get a!writeToMultipleDataStoreEntities and I am not having any luck getting even the most basic save to work.  Does anyone have any thoughts on why this may not be working?

 

The error I am getting is: 

Could not display interface. Please check definition and inputs.

Interface Definition: Expression evaluation error: An error occurred while executing a smart service: An error occurred while trying to write to the data store [Transactional]. No values have been written. Details: could not insert: [ENTITYToWriteDT6746] (APNX-1-4208-004) This error will not be displayed to the user viewing this form. 

 

= a!formLayout(
  label: "Form",
  /*should match PM Test Write to DS*/
  contents: {
    a!paragraphField(
      text: ri!error & ri!success
    )
  },
  buttons: a!buttonLayout(
    secondaryButtons: {
      a!buttonWidgetSubmit(
        label: "TEST WRITE",
        style: "NORMAL",
        value: true,
        saveInto: {
          a!writeToMultipleDataStoreEntities(
            valuesToStore: {
              a!entityData(
                entity: cons!ENTITY_TO_WRITE,
                data: {
                 ri!entity
                }
              )
            },
            onSuccess: a!save(
              ri!success,
              "successs"
            ),
            onError: a!save(
              ri!error,
              "errorr"
            )
          )
        },
        skipValidation: true
      )
    }
  ),
  validations: {}
)

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data