Hi,

How to do Attachment* as mandatory?

Like 3

Like

6 comments

Hello,

Thank you for your request. Unfortunately, it is not possible to make the Attachment required using custom methods as it is a detail.


However, as a workaround using l development, you can implement following validation script (sample for Activities) in object process for Validating message:

UserConnection userConnection = context.UserConnection;

   Select select = (Select)new Select(userConnection)
            .Column(Func.Count("Id"))
            .From("ActivityFile")
            .Where("ActivityId").IsEqual(Core.DB.Column.Parameter(Entity.Id));
       
if (select.ExecuteScalar<int>() == 0)
            throw new Exception("Attachment is required");

return true;

Halyna Parkhomenko,

 

Hi Halyna ,

Can you tell me in detail where I can put this code and where it runs inside Open Process?

 

Hi Halyna 

When I apply the code inside Open Process it gives me this message Is there a solution?

Hi Halyna 

When I apply the code inside Open Process it gives me this message Is there a solution?

 

Muath Ali Hamdan Salem,

 

Hello,

 

As for the 'Select' errors - the most probable reason is the usage of the Terrasoft.Core.DB namespace is not added to the class.

 

As for the last error in your screenshot - either it will be fixed by fixing previous errors or the issue is that you call construction that requires 1 type argument. Need to see the code in this line.

Hi,Oleg Drobina

Isn't there another way to make the attachment file mandatory through validation of the form page and not by placing a condition on the table in the database that I want in the form page?

Show all comments

Hi Community,

 

How do we create a Custom Attachment Detail with Custom Object in Classic UI.



Thanks 

Rakshith Dheer

Like 0

Like

1 comments

Hi Rakshith,



For custom sections, the following details should be created automatically along with the section itself.

The object used to build this detail must be called "*SectionObjectName*File"

For Example "UsrCasesFile".



However, if there is a need to create it manually, the following article from out academy will assist you: click here.

 

I hope this was helpful.

Show all comments