cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Meta data field is not updating database in contract header?

Former Member
0 Kudos

Dear all,

To cater a client requirement, we have enhanced contract header basic data component and added a sub screen using ViewContainerUIElement.

We have added a meta data field with 255 characters ,but this field is not a visible field. We wanted to update all the custom screen values entered by user  in the context element attribute of this field. This is working fine when we are uploading  contract through program.

But when creating directly we are unable to update this is table level.

The problem is even though context attribute of this meta data is changed, this is not updating in PDO updates. By debugging i found that  Mapper class only calling for update if any of the UI field is changed, but the meta data is not in the screen, which results this is not being updating in database.

How to update this meta data attribute even though it is not a UI field? Please help.

Thanks,
Vamshi

Accepted Solutions (1)

Accepted Solutions (1)

Vidya1
Explorer
0 Kudos

Hi Vamshi,

What do you mean by metadata field? Why are you using an invisible field to capture this information? So that it can update the PD directly without further mapping code?

As far as I know if the field is present in the screen, even if it's invisible and the data is available in the context, update will have the field data,  but will get saved to the DB only if you have the same field available in the corresponding bbp_pd table.

Regards,

Vidya

Former Member
0 Kudos

Hi Vidya,

Thanks for your reply. I thought i have already closed or deleted the thread as i got the solution and no reply by that time. However, let me brief our requirement and the solution.

As per the requirement,we need to enhance the standard Contract Header with a sub screen. The UI elements in this sub screen are few drop down list, check boxes which will be created dynamically. And this information will be passed to the subsequent documents also. So instead of saving this information in a custom table, we have created the a metadata field and updating the user information in that field, which is not needed to be entered or displayed.

So When ever users changed the data in the sub screen, we are updating the meta data field in the context node attribute. My issue was, even though it is successfully updated in the context it is not getting updated to database during save or performing another screen such as item overview.

Later I found through debugging that the context node element,which i am changing the value need to  set as changed by client. This is achieved through method SET_CHANGED_BY_CLIENT  of context node interface.

Thanks,
Vamshi

Answers (0)