Skip to main content
Solved

Custom validation with related object

  • February 26, 2020
  • 2 replies
  • 64 views

Forum|alt.badge.img+15

I have added a custom validation. The validation I’ve added is to prevent ‘localhost’ as part of an url in a http connector in a process flow. This works, however, the columns pk_col_1 - pk_col_7 are a bit of magic. As far I can see they are used to calculate what to show behind the tab ‘Related Object’ in the validation screen.

In this case i want the related object is reflecting the following address:

 

I notice there is a column “Object type” which is not documented, but I think does affect what the values of pk_col_1 - 5 needs to be:

But what Object type should I choose in this particular situation?

And with what values the pk_col_ columns should be filled?

I currently use this query:

insert into validation_msg (project_id 
 , project_vrs_id 
 , validation_id 
 , pk_col_1
 , pk_col_2
 , pk_col_3
 , pk_col_4
 , pk_col_5
 , generated 
 , insert_user 
 , insert_date_time
 , update_user 
 , update_date_time)
select
 @project_id,
 @project_vrs_id,
 @validation_id,
 @project_id as pk_col_1,
 @project_vrs_id as pk_col_2,
 pafip.process_flow_id as pk_col_3,
 pafip.process_action_id as pk_col_4,
 pafip.input_parmtr_id as pk_col_5,
 0,
 dbo.tsf_user(),
 getdate(),
 dbo.tsf_user(),
 getdate()
from process_action_fixed_input_parmtr pafip
where pafip.project_id = @project_id 
 and pafip.project_vrs_id = @project_vrs_id
 and pafip.input_parmtr_id = 'http_con_url' 
 and pafip.assignment_method = 'literal_constant'
 and pafip.constant_value like '%localhost%'

With the query and settings as above I get an error message in when opening the tab page ‘related objects’.

I know this is a bit of an advanced feature (it's quite hidden in ‘full model’, and you do need know how the SF-database works a bit), but could be very usefull (when properly documented).

Best answer by Jasper

Hi Rene,

The object type `Process action input option` corresponds to the general input parameters of a process action. The primary key of a valiation message should be filled with the primary key colums of the relevant table (`process_action_fixed_input_parmtr `), just like you did already.

I have tested your code your code myself and am able to open the Related object. What is the error message you are getting?
 

 

View original
Did this topic help you find an answer to your question?

Jasper
Superhero
  • March 3, 2020

Hi Rene,

The object type `Process action input option` corresponds to the general input parameters of a process action. The primary key of a valiation message should be filled with the primary key colums of the relevant table (`process_action_fixed_input_parmtr `), just like you did already.

I have tested your code your code myself and am able to open the Related object. What is the error message you are getting?
 

 


Forum|alt.badge.img+15
  • Superhero
  • March 3, 2020
Jasper wrote:

Hi Rene,

The object type `Process action input option` corresponds to the general input parameters of a process action. The primary key of a valiation message should be filled with the primary key colums of the relevant table (`process_action_fixed_input_parmtr `), just like you did already.

I have tested your code your code myself and am able to open the Related object. What is the error message you are getting?
 

 

I used “Process action type fixed input parameter” as Object type, but it should be “Process action input option”, thanks :grin: .


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings