This topic contains 2 replies, has 0 voices, and was last updated by karenn 8 years, 12 months ago.

  • Author
    Posts
  • #9719

    karenn

    Hello all!

    We are trying to create a workflow to default the Residential Address checkbox to checked when creating a new sales order but have had no luck. Even tried to use SuiteScript and no luck there either. Any ideas as to how to do this? I have tried different triggers but either get error as expected or does not even seem to execute. We are at a loss.

    Thanks for the help!

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

  • #9720

    KCSF Bud

    Not sure if you can do this via workflow, but you can use a user event script (its beforeSubmit so doesn’t actually set it until you save the record).

    Code:
    function isResidential(type)

    {if (type == ‘create’ || type == ‘edit’);
    {
    if(nlapiGetFieldValue(‘shipisresidential’) == ‘T’){
    nlapiSetFieldValue(‘custbody119′,’T’);
    }
    else{nlapiSetFieldValue(‘custbody119′,’F’);}
    }}
    ‘custbody119’ is a a read only field that shows anywhere you want on the form. Hope that helps.

  • #9721

    karenn

    Can’t really do that as we need to set the NetSuite flag and not a custom field but you have lead me to the shipisresidential id that suitescript seems to recognize but no where is this field exposed on the Sales Order form it seems. Not sure if it is really retaining this value or not when the order is fulfilled. Also, this means we could not click it off if for some reason in a few orders we would need to click it off. This field is a mystery

You must be logged in to reply to this topic.