Skip to main content
Hi All,

I have a custom object "Project" so I needed to make the following fields mandatory when the following conditions are true: - Stage: Awaiting job pack / External Approvals(From Opportunity object).

1. Post-Site Inspection Cost (Field available in the Project Object)

2. Project Cost Approved for Install ( Field available in Project Object)

Show error message on OPPORTUNITY that "Please populate Post-Site Inspection Cost and Project Cost Approved for Install in PROJECTS in order to change stage to Awaiting job pack / External Approvals"

Relationship between Project to Opportunity - Lookup, where we have a lookup to Opportunity from Project. 

Since its a Lookup relationship, I am obviously not able to access the project object from the opportunity object and the only way I am left(as far as my knowledge goes) with is writing a trigger. Is there any other way(via configuration) by which we can attain this requirement?

Many thanks in advance:)

Cheers,

​Sudip 
1 Antwort
  1. 2. Sept. 2016, 12:03
    Hi skmondal,

    Did you try adding a validation rule in the project object?

    If not try something like this

     

    AND(

    ISPICKVAL( Opportunity__r.StageName , " Awaiting job pack / External Approvals"),

    OR

    ISBLANK(Post-Site Inspection Cost),

    ISBLANK( Project Cost Approved for Install )

    )

    )

    Thank you

    PS:pls mark as best answer if it helps
0/9000