function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jrochjroch 

Error: Compile Error: Method does not exist or incorrect signature: void getNetworkId() from the type System

Hello

I'm trying to use a Sytem method as in 

String networkId = System.getNetworkId();
but I cannot save it. I get an error. The documentation for the class shows that its supposed to return a string. Any ideas.

Error: Compile Error: Method does not exist or incorrect signature: void getNetworkId() from the type System 

Thanks

john
 
Best Answer chosen by jroch
Lucas CalegariLucas Calegari
Hi friend. Actually this is a Networkd object and not System
Try it with Network.getNetworkId();

All Answers

Lucas CalegariLucas Calegari
Hi friend. Actually this is a Networkd object and not System
Try it with Network.getNetworkId();
This was selected as the best answer
jrochjroch
Thank you Lucas. You are right. I was using the wrong object.
 
Lucas CalegariLucas Calegari
Great!