cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a record using APIs and skipping the Validations

Former Member
0 Kudos

Hi guys,

I'm creating a record using the APIs from the Portal. What I need to have is only 5 fields initially entered in the record, but at the Repository we have about 15 different fields that have validations not to be null.

That basically stops my API and instead of creating the record I get the error:

One or more records failed a validation.

I need to know if I can create a record using the APIs that does not trigger the validations. Is there a way to create a record that does not care about the validations?

What approach would you take.

Thanks for your help,

Boris

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Boris

you have two options:

1. Define mandatory field validation for those 5 fields only and for rest have warning message. Ensure these 5 fields mandatory validation at UI level also.

2. I think we have separate API for creating new record which doesnot check for validations in MDM. Use that.

hope this helps

Best regards

Ravi Kumar

Former Member
0 Kudos

Hi Ravi,

Thanks for your fast response.

Does anyone know the method for creating a record without triggering validations?

Regards,

Boris

Answers (2)

Answers (2)

Former Member
0 Kudos

Actually, if the new SP6 is used - the validations to check if the value IS_NOT_NULL can be done in the Console by marking the field as Required = Yes.

This ensures that in the iView there is a validation for that and also allows the API to create the record without erroring out.

That's the approach that I took and it works well for us.

Best regards,

Boris

Former Member
0 Kudos

Hi Boris,

I am not sure about how this can be done through API,

But i would like to suggest a workaround,if you are using MDM with portal stad content and have the MDM workflow in use.

You can make the first 5 fields that you wish to enter as a Error validation and the rest 10 fields whose values will be entered later as NONE is the automatic execution property in MDM Data manager.

You can go ahead a create the Master record through portal and is any of the 5 first fields fail the validation,MDM will throw an error accordingly on the portal.

The record will then be created in MDM.

You can then enrich the record with the other field values either manually or through Automatic import through an MDM workflows.

In the MDM workflow you can have Start->Process->Validate->Stop.

When the user enriches the other 10 fields in the process step of teh workflow,and the record moves to teh validate step.

The validation which are marked as None will run on them and will throw an error message for only those 10 new field entries if their validation fails.

I just thought to share this idea with you in case you wish to implement this requirement without the pain of customization and in a different light.

Hope It Helped

Thanks & Regards

Simona Pinto