Skip to Content

Set extension fields as "mandatory" in C4C web service

Dear experts,

we are extending a standard BO with some extension fields in PDI. These fields are also exposed as additional fields in the corresponding web service using a process extension scenario.

My question is if it is possible to set these fields as mandatory in PDI so that the fields are also automatically defined as mandatory in the WSDL (and resulting in error when the field is not sent in the SOAP request)?

Thank you for your advice.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 31 at 07:20 AM

    Hello Florian,

    It is possible to set the extension fields as mandatory by writing the validation code in Vaidation-OnSave event of the extension BO. There you write a condition as below:

    "if(x.IsInitial()){

    return false;

    raise Message.Create("E", "message");

    }

    return false will make sure save is not happening if the particular field is empty.

    Now when the web service is triggered, and if the field is empty, the same validation will trigger and the web service request will fail with the message that you have raised.

    Hope this helps,

    Thanks & Regards,

    Meghna

    Add comment
    10|10000 characters needed characters exceeded