This topic contains 3 replies, has 0 voices, and was last updated by noehcc 8 years, 1 month ago.

  • Author
    Posts
  • #6104

    Jordan Manningham

    A few months back I discovered a site that listed nlapiSetFieldMandatory as an undocumented function for SS1.0. Since then I’ve applied that function in numerous client scripts and all have worked beautifully until last week. The function no longer acts as intended but instead puts a red * next to the field but does not actually make it mandatory. The forms will submit without validating the fields I set mandatory. I submitted a case about this and the response I received said to use nlapiGetField and .setMandatory(true) in a user event script. So I gave that a shot and still no luck.

    I could try to use workflows to accomplish what I want – but my code sets fields mandatory and not mandatory depending on a lot of logic. Due to the limits with workflows, I can’t accomplish the same type of dynamic changes I was once able to do with a client script.

    I’m new to scripting and can only manage to create functioning client and user event scripts. If what I want done can be done via suitelets or restlets, could I get some guidance?

    Has anyone else encountered this same issue?

    Thanks
    This is a cached copy. Click here to see the original post.

  • #6105

    tect22

    Hi,

    Yes its a long time issue already, and its still not working. Workaround for this, is to create a save validation in client script for the field you need to be mandatory.

    Thanks.

    Hector

  • #6106

    tect22

    Hi,

    Yes its a long time issue already, and its still not working. Workaround for this, is to create a save validation in client script for the field you need to be mandatory.

    Thanks.

    Hector

  • #6107

    noehcc

    Hi,

    Use before load get the field and set it to mandatory “field.setMandatory”.

    Thanks

    Noeh

You must be logged in to reply to this topic.