I am trying to get some data from a selected document and place it another document for easier build. I want to do this in an agent, but it is saying “@Command and other UI functions are not allowed with this search type; please select ‘None’ as your runtime target”; however when I run it in an action button it works fine. Here is the code.
temphost := @GetDocField(@DocumentUniqueID; “hihostname”);
tempserial := @GetDocField(@DocumentUniqueID; “hiserial”);
tempmodel := @GetDocField(@DocumentUniqueID; “himodel”);
tempip := @GetDocField(@DocumentUniqueID; “hiaddress”);
tempmachine := temphost + " " + tempserial + " " + tempmodel + " " + tempip;
@Command([Compose];“Create Topology Instance”);
FIELD Selected := “1”;
FIELD title := “Assign Hardware Instance to Solution”;
FIELD top_machine := tempmachine;
Any suggestions?