Apologies if this is strictly within the realms of Sugar Pro or Enteprise, but on Sugar OS I simply want to define a set of tasks wheever a Case is created. My PHP is hopeless but I do have 20 yrs IT so I thought I'd give it a go... I can see from the forums (good here init?) that perhaps a logic hook to execute custom code after the Case has been saved sounds ideal.
Problem is, I can see only 3 or 4 examples of a logic hook, including the Deassignment Notification hook, and the advice in the wiki. These dont quite cover what I want to do, which is "after_save" of a Case, for the first time, I want to create a dozen or so tasks. I'm aware of the requirement to have the parent_type of Case and to trap the case_id to match the tasks with the correpsonding case, but to actually write the tasks to the database, should I use the Sugarbean (and if so could I be so cheeky as to ask for an example) or should I simply INSERT the records into the database...
Naturally I'd like to keep the code standardised if possible, which I guess means using the Sugarbean. I realise some of this code may be available as part of Workflow and therefore if there is a reason for the lack of exmaples then I'll understand.
Great work - both in terms of the code and the forums....
Chris
Sugar 4.5.1 (Bitrock)


LinkBack URL
About LinkBacks



Reply With Quote


Bookmarks