Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1070 Zobrazení

I am trying to write some code to make an automation that will populate a date field that is 3 days from now I have this code 

record.x_studio_three_days_after_quotation_sent = datetime.datetime.now () + datetime.timedelta(days=3	

but it gives me an error: " forbidden opcode(s) in 'record.x_studio_three_days_after_quotation_sent = datetime.datetime.now () + datetime.timedelta(days=3)': STORE_ATTR"

I am only using studio not sh. Does anyone have any ideas?

Avatar
Zrušit
Nejlepší odpověď

are you looping in self?

for record in self:

​record.x_studio_three_days_after_quotation_sent = datetime.datetime.now () + datetime.timedelta(days=3)

would be a good idea to provide more context if possible

Avatar
Zrušit
Autor

I am not looping I want to put one line of code in the 'Execute Code' action in an automation.

Related Posts Odpovědi Zobrazení Aktivita
4
kvě 24
2735
1
úno 19
4234
1
led 25
1115
2
čvn 23
2612
0
pro 24
2538