I wanted to create an auto-generated date field (follow-up as seen on the attachment) which is one year after date of production. Attached the image of the screen and the fields in it.
can someone help me on this?
If this is a screen built using workflow then for the date field workflow action use the action type 'Set Column Value'. When that action type is used with a date field the Value box is opened. You can enter a number her that is the offset (in minutes) from the current date/time. If you want a year offset use 525600.
Or you could use the EXECUTE SQL on Workflow, lets assume the fields are called oppo_production and oppo_followup. Then you could use
UPDATE Opportunity SET oppo_followup = DATEADD(Year,1,oppo_production) WHERE oppo_opportunityid = #oppo_opportunityid#
Set this up with no notification and an order number like 999
Jeff Richards Thanks for that.Yes it is a screen built using workflow. The idea you proposed works under the perspective of current date/time. Here its more like the Followup field is dependent onto 'Date of Production'. So it must be one year after the value given in 'date of production' field.
@Matthew Thanks for your response but I couldn't get a proper output with the same.
Then in the CreateScript of the field set the DefaultValue to be the correct date.
thank you so much! only this helped me, too
short life free
© The Sage Group plc 2019All Rights Reserved