cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help Calling a function from other DC

Former Member
0 Kudos

HI,

after migration from 7.0 to 7.1, I have some errors, where my colleague used a function from an Used Component in the Component Controller.

Under Used-Component and in Dependencys, this Used Component is available.

He called the function from the Component with this code:

wdThis.wdGetCrmFunctionsInterface().

This method isn't available after migration. Is this an error from the migration process or do I need a different Code to call the function of the Used Component?

Best regards,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

former_member201361
Active Contributor
0 Kudos

Hi Peter,

Open the component controller --> go to properties tab --> and add the component usage and component interface as required controllers to access the methods.

Now, in the component controller java editor,

use the code

wdThis.wdGetCrmFunctionsInterface().<ur method name>;

check whether the method is accessible or not

please check whether u have the exposed the method in the interface controller. and Sync both the DCs once and check.

Hope it helps,

Thanks and Regards

Former Member
0 Kudos

HI,

thanks, now I can access the function.

Thank you very much.

Best regards,

Peter

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Say if your consuming DC is DC1 and the DC which contains the method implementation is DC2,

1. The method should be defined in the Interface Controller and implemented in your Component Controller of DC2

2. Build the DC2 .

3. The expose DC2 as public part (Right click Components -> Development Component -> Show In -> Component Properties)

4. In the Public Parts tab, Click on Add button and create a public part.

5. In your DC1, add the DC2 public part which was created as Dependencies (Right click in DC1 Components -> Development Component -> SHow In -> Component Properties) In the Dependecies tab, click on add and select the DC2 Public Part.

5. Right click in DC1 on Used Components -> Add Used Components -> browse -> Select the DC2 Public part and give a name and finish

7. Click on Build in DC1, it will build DC1 as well as the public part DC2.

8. Now you can access the method the same way how you are trying to access.

Thanks,

Venkat