Skip to Content
Menu
This question has been flagged
1 Reply
1202 Views

Hi people

I'm struggling with a scheduled action and i would like some help if possible.

On the stock.production.lot model i have added 3 fields. 

1. Date field ( x_studio_exp_warranty_date )

2. Selection Field with the values of UNDER WARRANTY and EXPIRED (x_studio_warranty_status)

3. Condition Field ( condition_id ). This field get the condition "Shipped" then the serial number gets shipped.


Im trying to accomplish a Warranty Status change if the date field if before or equal to todays date. It is going to be a scheduled action that will finds the shipped serial numbers that are shipped and x_studio_exp_warranty_date=< today

then set x_studio_warranty_status to EXPIRED.


How can i put all this in python expression?


Thanks for putting up with me 

 

Avatar
Discard
Best Answer

Hi,

Try,


This will change the status of the warranty field to "expired" if the expiration date is less than or equal to today.

if  x_studio_warranty_status is a selection field then,



It will take records only in the "shipped" state and update the status of the warranty field to "expired" if the expiration date is less than or equal to today.


Hope it helps,
Kiran K

Avatar
Discard
Author

Thank you so much Kiran

It works like a charm

You're welcome! I'm glad to hear that It helps you.