cancel
Showing results for 
Search instead for 
Did you mean: 

Custom assignment block is not working when hidden

Former Member
0 Kudos

Dear All

We have created a custom assignment block and inserted in the opportunity overview screen as an assignment block.

This assignment block has validation date and last pipeline update date fields. Whenever we do some changes to certain

pipeline fields( say Origin,probability...) then immediately the field( Pipeline update date ) of the custom assignment block will be

updated with the current date and time( time stamp).

Now as per the requirement by default this assignment block has to be hidden( we do this using the configuration) and whenever

the user needs it he will add it on to the screen using personalize but the issue is whenever the assignment block is hidden and if

user changes any of the pipeline fields correspondingly the value for the Pipeline update date field is not updating.

We have done the corresponding coding in DO_PREPARE_OUTPUT.

Can you someone guide me why the code is not triggering when it is hidden, we need the fields should be updated even when it is hidden.

Regards

Anil

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Anil,

The method DO_PREPARE_OUTPUT of the custom assignment block will not be triggered if the assignment block is hidden. The reason behind this is, the view has to be instantiated for it to call this method.

DO_PREPARE_OUTPUT method of which assignment block, have you put the corresponding code?

I suppose the field values in your assignment block is not persisted in tha backend. You can achieve your requirement creating a new relation and handling it in the genil layer. By doing this, irrespective of whether the view is hidden or not, whenever the view is loaded it will read the correct value.

Alternatively if you properly code the DO_PREPARE_OUTPUT method of your custom assignment block, you can get the correct values. ie. whenever the user make the custom AB visible, it should read the updated values. You can follow this only if the field values are not persisted. Otherwise it is not recomended to put any business logic at the UI layer.

Thanks for your understanding. Keep posting your queries to SCN and get valuable answers.

Best Regards,

Leon

Answers (1)

Answers (1)

former_member186543
Active Contributor
0 Kudos

Hi Anil

Yes obviously if you have written the timestamp preparation code in the DO_PREPARE_OUTPUT of the custom view then it wont trigger until it's visible. Since it makes no sense to run the code of blocks which are not visible as it may cause performance issues.

Hence the solution to your problem is that , you can write the code in the DO_PREPARE_OUTPUT of the views where those fields are present from which the custom view picks the value.

Br,

Hasan Rafiq