You are not looking for a BP tutorial then, the code stage accepts Visual Basic or C# code and you will have to learn either one of these languages.
One thing you have to know is that when you create a code stage you are actually creating a method (a Sub in Visual Basic). The code stage accepts any code that can be inside a Sub.
The code stage if effectively a Sub with ByVal and ByRef parameters, eg Sub AddNumbers(ByVal input1 As Decimal, ByVal input2 As Decimal, ByRef output As Decimal)
I want to write a special procedure for excel that are not provided by the Excel VBO. When I try to write GetWorksheet() function in my object, I get this error - ""GetWorkshet is not declared. It may be inaccessible due to its protection level.""
But when I try to do the same by adding a code stage in a new page of the Excel VBO, it works fine.
What is the problem when using it in my object?
The GetWorksheetFunction is declared in the ExcelVBO. Look at the Initialise Page to the Properties of the Frame MSExcelVBO. Here you find the GlobalCode with all declared Functions. Copy the necessary Functions to your Object an if necessary the NamespaceImports under CodeOptions to your own Object.
Hi Raviteja,
Go to business object(which you want to write code stage)-> Go to initial page -> object description box double click it -> go to code options-> you can add external dll here. try it
Hello,
I tried to execute below code in BP -Object Studio.
public int Calculate(int a, int b)
{
return a + b;
}
But I am getting an error.
Compiler error at line 0:} expected.
Kindly give me the solution.
Hi Kiran
I have tried above mentioned option. But it is not working. Getting dll reference error. Even after give referecne of DLL.
Internal : Could not execute code stage because exception thrown by code stage: Could not load file or assembly 'WebApiInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.