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
  • So is the scenario that if no Validity period is supplied by the requestor, then 365 should be used, or is it always 365 days for that particular product? Or is the 365 period once the request has been approved?

    Eitherways, you shoud be able to do this by putting a template on the ValidUntil column on ShoppingCartItem, something like (complete untested!!)

    If $FK(UID_AccProduct).Ident_AccProduct.Equals("My Product) Then

    Value = DateTime.Now.AddYears(1)

    End If

    Alternatively, if the Validity period is for 1 year AFTER approval, then you can put the template on the ValudUnti on PersonWantsOrg and calculate it to be 1 year after DateAssigned.

    HTH

    Aarav

Reply
  • So is the scenario that if no Validity period is supplied by the requestor, then 365 should be used, or is it always 365 days for that particular product? Or is the 365 period once the request has been approved?

    Eitherways, you shoud be able to do this by putting a template on the ValidUntil column on ShoppingCartItem, something like (complete untested!!)

    If $FK(UID_AccProduct).Ident_AccProduct.Equals("My Product) Then

    Value = DateTime.Now.AddYears(1)

    End If

    Alternatively, if the Validity period is for 1 year AFTER approval, then you can put the template on the ValudUnti on PersonWantsOrg and calculate it to be 1 year after DateAssigned.

    HTH

    Aarav

Children
No Data