Ronan - Friday, June 10, 2011 3:07 PM:
Hi,
I'm trying to do this crazy cocktail for ECNs:
- Automatic numbering, used when a ECN is created manually (“I, change specialist, want to create a ECN from scratch”)
- Forced numbering, used when a ECN is created automatically from a homemade method creating invoked at the end of the ECR process (“Innovator sees that ‘ECN Required’ is checked in ECR-123456 and creates an associated ECN-123456”, kind of what the CM Actions do).
1. works fine, but when trying to do 2., Innovator goes with the sequence even though my code specifies a specific number (my ecn.setProperty("item_number", ecnNb); is ignored). Ideally I'd like a flag telling Innovator not to use the sequence.
I could stay manual by default and use getNextSequence(), but don't want to end up replacing OnAdd/OnUpdate... Am I missing something? Do you see a quick way to achieve what I want?
Thanks!
Brian - Sunday, June 12, 2011 7:39 AM:
I would use an onBeforeAdd and determine which method is to be used. Then either set the sequence using your own methods or call getNextSequence.
You need to set the data type to be a string not a sequence.
Cheers,
Brian.
Ronan - Monday, June 13, 2011 10:56 AM:
Heh, it just works. That wasn't so complicated, I don't know why I was thinking to dive in OnAdd :P
Thanks Brian!