Sage 100

 View Only
  • 1.  I am looking for a sample script that will default

    Posted 02-20-2014 07:38
    I am looking for a sample script that will default the ship/expire date field on a quote. I thought there was a sample one from one of the scripting demos. Does anyone happen to have one?


  • 2.  RE: I am looking for a sample script that will default

    Posted 02-21-2014 05:46
    What do you want the Ship/Expire date field to default to? And do you only want that for Quote type orders?


  • 3.  RE: I am looking for a sample script that will default

    Posted 02-21-2014 06:26
    Yes, this would only be for quotes and would be for a set number of days from the quote date.


  • 4.  RE: I am looking for a sample script that will default

    Posted 02-21-2014 07:15
    I know you can create a custom button with a Script of something like: {ship/expire date field} = {order date field} + # - but that'd require users to manually click the button when applicable. But I'm sure a Script is possible to automate it for Quotes only; I can't help you there though.


  • 5.  RE: I am looking for a sample script that will default

    Posted 02-21-2014 09:07
      |   view attached
    Here's a script that we set up as a pre-write User Defined Script. It does not check that the type is quote, but it will see if the expire date was not set and then default it to 30 days from today when they hit Accept.

    Attachment(s)



  • 6.  RE: I am looking for a sample script that will default

    Posted 02-21-2014 09:22
    @SteveIwanowski Thanks. Perfect!


  • 7.  RE: I am looking for a sample script that will default

    Posted 02-21-2014 09:35
    oh, and if you wanted to avoid expiration dates on the weekend, you can add the following two lines after the DateAdd: If WeekDay(strTempDate)=1 ThenstrTempDate=DateAdd(""d"",-2,strTempDate) If WeekDay(strTempDate)=7 ThenstrTempDate=DateAdd(""d"",-1,strTempDate)