This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Products with a Limited Request Period

Hi,

I am struggling with requesting items that have the validity period in ITShop set to a value.

In my scenario the Validity period is set to 365 days. When a user requests an item without specifying "Valid until" as additional information in the shopping cart, the request is sent to the approver with "unlimited" set as valid until value.

If the approver chooses to approve the request, but dont fill in the valid until field, he presented with an error message stating that "Valid until is a compulsory field and needs to be filled". If the approver denies the request, he is unable to change the valid until field and is presented with the same error message.

Is it possible to automatically fill the "Valid until"-value in the webshop with the validity period from the ITShop item?

I'm using D1IM 6.1.2

Any help will be greatly appreciated!

Parents
  • Hi Markus,

    The default template at PersonWantsOrg.ValidUntil is set to the following. It shouldn't do more than adding the TimeSpan to the date:

    ' With $ValidUntil$ we usually mean the end of this day
    If Not DbVal.IsEmpty(Value, ValType.Date) AndAlso CDate(Value).TimeOfDay = TimeSpan.Zero Then
        Value = CDate(Value) + New TimeSpan(23,59,59)
    End If

Reply
  • Hi Markus,

    The default template at PersonWantsOrg.ValidUntil is set to the following. It shouldn't do more than adding the TimeSpan to the date:

    ' With $ValidUntil$ we usually mean the end of this day
    If Not DbVal.IsEmpty(Value, ValType.Date) AndAlso CDate(Value).TimeOfDay = TimeSpan.Zero Then
        Value = CDate(Value) + New TimeSpan(23,59,59)
    End If

Children
No Data