Skip to main content

Hi,

I’m working with Test-a-rest 

I’m getting an issue when trying to run status change actions.  For example I have this simplified script:

 

```cs

Eval "S"  Into myRegionCode 
Get SalesRegionsHandling.svc/SalesRegions(RegionCode='{$myRegionCode}') Into myRegion
Print myRegion
Create SalesRegionsHandling.svc/SalesRegions(RegionCode='{$myRegionCode}')/IfsApp.SalesRegionsHandling.SalesRegion_SetHidden Using myRegion
{
}

```

 

It should set the Region from Active to Hidden.

But I get this error, URI is malformed.  Any ideas what’s going wrong?

 

Hi!

You cannot do a Create command with “using” parameter. You can see in the error message from the server that “using...” is sent in the HTTP request. Which the server does not accept (and gives error)

If the server requires e-tag in the header use “Patch” or similar command. Check the command reference documentation, it’s quite elaborated in the syntax and inner workings.


Thanks @HET !

I found how to do it.  keyword “Action”

 

Eval "T"  Into myRegionCode 

Get SalesRegionsHandling.svc/SalesRegions(RegionCode='{$myRegionCode}') Into myRegion

Action SalesRegionsHandling.svc/SalesRegions(RegionCode='{$myRegionCode}')/IfsApp.SalesRegionsHandling.SalesRegion_SetHidden Using myRegion  Into result
{
}

 


Reply