This topic contains 9 replies, has 5 voices, and was last updated by robversluis 6 years, 1 month ago.
- Topic
I need to create comment with attachment on workflow transition. I solved problem, how to create comment on transition, but I can’t add attachment.
Here is my code:
12345678910111213141516171819202122232425262728293031323334353637383940## Attributesattributes:new_comment:label: oro.comment.entity_labeltype: entityoptions:class: Oro\Bundle\CommentBundle\Entity\Commentcomment_message:label: oro.comment.message.labeltype: stringcomment_attachment:label: oro.comment.attachment.labeltype: file## Transitionstransitions:approve:label: 'Approve'step_to: closedfrontend_options:transition_definition: approve_definitionform_options:attribute_fields:comment_message:form_type: textareacomment_attachment:form_type: oro_image## Transition definitionstransition_definitions:approve_definition:post_actions:- @create_entity: # create Commentparameters:class: Oro\Bundle\CommentBundle\Entity\Commentattribute: $new_commentdata:message: $comment_messagetask_f06ab819: $taskattachment: $comment_attachmentWhen I run $ php app/console bro:workflow:definitions:load, I have error:
12[Oro\Bundle\WorkflowBundle\Exception\AssemblerException]Invalid attribute type "file", allowed types are "bool", "boolean", "int", "integer", "float", "string", "array", "object", "entity"What type of attribute should be comment_attachment?
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.