I stumble upon this problem multiple times so far. I want to make workflow initiate automatically.(through apex code) All my workflow is doing is copying a field value.(This field is new so it is not affected by any trigger) My code snippet is running as expected, on logs I can see the workflow runs and update the field but on reality I cannot the field is not updated.
12:29:45.592 (931700366)|WF_FORMULA|Formula:ENCODED:[treatNullAsNull]True|Values: 12:29:45.592 (931710018)|WF_CRITERIA_END|true 12:29:45.592 (932082146)|WF_SPOOL_ACTION_BEGIN|Workflow 12:29:45.592 (942730206)|WF_ACTION| Field Update: 1; 12:29:45.592 (942747241)|WF_RULE_EVAL_END 12:29:45.592 (942857210)|WF_ACTIONS_END| Field Update: 1; 12:29:45.592 (942871943)|CODE_UNIT_FINISHED|Workflow:OpportunityLineItem 12:29:45.592 (975465283)|DML_END|
Any ideas? Thanks.