Rules

Here are the main rules to follow in order for custom scripts to run smoothly :

When you create a new feature with New-PXFeature, you can specify the -createfile switch so that a script template is generated to help you start writing your API code.

The Inputs object

Inside the Inputs object, you will find :

The returned object

Custom features scripts must return the following Powershell Custom Object :

[PSCustomObject]@{
  ReturnCode=<[System.Net.HttpStatusCode]>
  Content=<string>
  ContentType=<content-type>
}

see System.Net.HttpStatusCode

Examples

You will find an example of a custom feature script with the feature called demo-feature.