You need to sign in to do that
Don't have an account?
Nagoor Shaik 16
trigger concepts
Hi could please solve this query.
i have two custom objects like company and department.If department >5 then display status is low or medium or high so please solve this
i have two custom objects like company and department.If department >5 then display status is low or medium or high so please solve this
This can also be done without triggers by standard salesforce features.
Going by your Example, Company being a parent object and Department its child. We can create one Rollup summary and one Formula Field. Rollup Summary to calculate the number of Departments associated with the Account.
Formula Field to Display the Status according to your conditions
If you specifically require a trigger then please use the code given below:
All Answers
Are you meaning if there are more than 5 department records? On which object is the status field located?
This can also be done without triggers by standard salesforce features.
Going by your Example, Company being a parent object and Department its child. We can create one Rollup summary and one Formula Field. Rollup Summary to calculate the number of Departments associated with the Account.
Formula Field to Display the Status according to your conditions
If you specifically require a trigger then please use the code given below: