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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 31, 2018 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.