Hi,

I start work on Erpal Plataform to create a Workflow to manage client contact and employees tasks.
At this moment I am try to understand how Erpal Plataform is stucture, compare with the developement done on Erpal Services.

At this moment I can't understand yet, one think. In Erpal Services, when we create an activity, one task is create on Projects (Internal work).

How can I do this on Erpal Plataform? which is the correct way to do this?

I saw you do not use rules module to do this in Erpal Services... but I cant find how you do at this moment.

Thanks.

Comments

mogadix created an issue. See original summary.

bechtold’s picture

Assigned: Unassigned » ak1ra

Hey mogadix,
thx for asking. These are exactly the questions we need to improve our documentation, to get more people into using ERPAL platform. So feel free to ask ;-)

You are right, in ERPAL for service providers we didn't use rules for that. But since ERPAL platform is completely different from it's architecture it doesn't make sense to compare them anyways.

So for ERPAL platform:

  • enable rules ui
  • goto /node/add/erpal-project to create a project (Let's give it a title "Activities" for now).
  • goto /admin/config/workflow/rules/reaction/add to create a new rule (Give it a title "Create task on new activity")
  • The event to react on must be "After saving a new crm core activity"
  • Add an action "Create a new entity"
  • Entity type = node
  • Content type = task
  • Title = crm-core-activity:title (I want to have the same title as on the activity)
  • Author = site:current-user (but that's up to you)
  • Save
  • Add an action "Set a data value"
  • Data = entity-created:field-task-project
  • Value - Node Identifier = 1 (this is the nid of the "Activities" project in my case)
  • If you add an entity reference field "field_task_activity" to the task content type
  • you can add a "Set a data value" action
  • Data: entity-created:field-task-activity
  • Value: crm-core-activity

Let's ask @ak1ra to create a nice docs page for http://platform.docs.erpal.info/en/latest/

I hope this helps, let us know if you have any more questions :-)

Cheers
bechtold

bechtold’s picture

Title: Create task when create a activity » Tutorial: Create task when create a activity

Just marking it as tutorial, so we find it faster when we edit the documentation pages.