Question

Validation on detail grid

Hi Guys,

Is it possible to put a validation on detail. I have an activity that has Address detail in it. The detail has a column with a chcek box. I want a validation that checks if all the check boxs on the detail are checked before user can save the activity.

 

Please, any advise will be highly appreciated.

File attachments

Like

1 comments

Dear Adebola,



You have to overwrite save method in your ActivityPageV2 in Custom package. You should run an ESQ

https://academy.bpmonline.com/documents/technic-sdk/7-10/use-entityschemaquery-implementation-client

to the table where you store addresses, whether it ContactAddress, AccountAddress, LeadAddress or your own custom object, filter it by column, which you use to link this detail with Activity and return any addresses where the value of your field is false(or count of those addresses). Example of query you need(in SQL):

SELECT Id FROM ContactAddress WHERE ContactID = 'Id of Contact in Activity' AND 'MyCustomBooleanField' = 0

Then, if query returns any addresses, the warning is shown to the user(you can use showInformationDialog for it), otherwise you just save the record using this.callParent(arguments)



Bogdan

Show all comments