How to get parent record id?

Hi community,

I made a custom button in the product in order detail action menu.

In this button onClick event, I called a business process and had to pass the order's id to it.

How do I get the order id from within the product in order detail schema so that I can pass it to the business process?

 

Thank you!

Like 0

Like

2 comments
Best reply

Hi,

 

You can use:

this.get("MasterRecordId")

to get the master record Id value and use it in the click handler method.

Hi Andrew,



1. You can pass OrderProductId to the process and read OrderId from OrderProduct



2. You can call process from OrderProductDetailV2 with such a code:



            runMyBusinessProcessAll: function() {

                ProcessModuleUtilities.executeProcess({

                    "sysProcessName": "UsrMyProcess",

                    "parameters": {

                        "OrderId": this.get("MasterRecordId")

                    }

                });

            },

Hi,

 

You can use:

this.get("MasterRecordId")

to get the master record Id value and use it in the click handler method.

Show all comments