Calling Business function – Sample Code

rnorm_lynx

New member
Here you go:

Code:
            ValidateAccountNumber bsfn = new ValidateAccountNumber();
            bsfn.DpszAccountNumber.InValue = "1.1105";
            bsfn.DpcFormatAccountNumberAs.InValue = '1';
            bsfn.DpcIncludeAccountSymbol.InValue = '1';
            bsfn.DpcAccountDuplication.InValue = '1';
            bsfn.DpcBasedOnFormat.InValue = '7';

            BusinessFunctionResult result = bsfn.Execute();
            if (result == BusinessFunctionResult.Success)
            {
                string mcu = bsfn.DpszDisplayBusinessUnit.OutValue.Trim().PadLeft(12, ' ');
                string obj = bsfn.DpszDisplayObject.OutValue.Trim();
                string sub = bsfn.DpszDisplaySubsidiary.OutValue.Trim();
                string description = bsfn.DpszAccountDescription.OutValue.TrimEnd();
            }
 
Last edited:

rnorm_lynx

New member
DNetGen, the tool you used to generate the class library for this business function creates:
  • XML schema snippet for the object
  • Sample code to use the object
Check the sample folder of the output folder where your referenced JDE object library is. There should be a ValidateAccountNumber.txt file there. See attached file for reference.
 

Attachments

Last edited:
Top