Accessing batch registration parameters in C# export script

Hi, how can I access a batch registration parameter in a C# export script?


For example, I want to pass a URL as a batch parameter, and then use this in my export script to create a new RestClient. 


string url = **batch registration parameter here**

var restClient = new RestClient(url);


Thanks in advance.



1 comment

  • Avatar
    Collins Sarmento

    Hi Andrew,

    There are two ways you could do this.

    1. Create a Service Field and assign the Batch registration parameter to that field. Then you could call that field in your export script using string url =  Context.Field("ServiceFieldName").Text

    2. There is also a way to get the batch registration param in the code but i cant remember the syntax off the top of my head. I can look later this afternoon.

    Is the url unique at the batch level or project level. You could also use a project environment variable




Please sign in to leave a comment.