Best practices in implementing CRUD model for attachments

Hi Community,

We have a project with complex CRUD model for attachments of an object.

For example after a certain active stage, all CRUD operations should be blocked

Attachments are being stored in the sysfile object as per the new attachments architecture of Creatio since I believe v8

This approach does not enable flexibility for object permissions as what you define for the sysfile of that object will be applied to all attachments in the application.


In the past what we have done is to close the possible CRUD operations via front end, with business rules and custom code.

It will also be possible to do this via process, record by record

As anyone had any experience with this type of implementation and what has been implemented?

Would it be advised to create a separate attachments object to use the "standard" access permissions?

Thanks,

Luis

Like 2

Like

5 comments

Greetings,

Creating a separate object for attachments is recommended, and you should use standard access control mechanisms (ACL).

This is a good solution without involving management through processes and business rules.

Regards,
Orkhan

Orkhan,

Thanks for the sugestion Orkhan, I'm prototyping that path. 

Created an object with file as Parent Object and a column to link it to the main object, 

but after I can't access it:

 

 

to link to that main object.

 

Am I missing something? 

Thanks

Luis

Luis Tinoco Azevedo,

After some trial and error I believe I've found out what I was missing, the name of the file should be: NameOfTheMainObject+File, so in my case:

Main object: labQualityFile

Attachmetns object: labQualityFileFile

 

following  part of @ryan's instructions on this thread:

https://community.creatio.com/questions/add-attachments-detail

Hello,

Yes, the correct approach is to include ...File in the code of the object.

Nick Ovchynnik,

Hi Nick,

thanks, I've implemented the File object for attachments but am facing some dificulties in implementing record permissions for the attachments.

When an attachment is in "Active" state noone should be allowed to delete it.

I've activated record permissions and I've removed access to the specific file for CRUD operations but am still able to delete file

 

any ideas on how to implement this?

Cheers,

Luis

Show all comments