The defence was offered after retired social worker Rohan Beyts, a longstanding opponent of Trump International Golf Links, took legal action over staff photographing her after she got caught short on a walk close to the beach near the Aberdeenshire course in April 2016.
Ms Beyts, 62, who has told a court she suffers from bladder problems, has claimed that two police officers subsequently turned up at her home in Montrose, Angus at around 10pm in the evening, leading to her being charged for public annoyance.
The charges were dropped after she refused to accept a written warning.
But after being “shocked” and “upset” to discover from police that golf course staff had used a mobile phone to photograph her urinating, Ms Beyts took legal action of her own.
She is now demanding £3,000 in damages on the grounds that course staff had breached data protection laws by "secretly filming" her.
Her lawyer Mike Dailly told a small claims hearing at Edinburgh Sheriff Court that photographs of her urinating had been "captured unlawfully" because Trump International Golf Links was not registered under the Data Protection Act.
This, however, prompted the defence from Mr Trump’s golf course that the fight against crime would suffer “serious” adverse consequences if Sheriff Donald Corke ruled it had been wrong to photograph a woman urinating in such circumstances.
Paul Motion QC, representing the golf course, told the court that if Ms Beyts’ claim was upheld "the consequences are serious for the prevention of crime and the apprehension of offenders".
Greenkeeper Edward Irvine, 23 had told the court he had photographed Ms Beyts urinating as "evidence" of what he considered a criminal act, and, said Mr Motion, it had been "reasonable, proportionate and fair" to take such a photo if he believed a crime had been committed.
"To become liable in charges due to a technical registration default,” added Mr Motion, “Would have an adverse effect on the prevention and detection of crime."
Sheriff Corke is due to deliver judgement on Wednesday on what is far from the only controversy to have affected the course since Mr Trump purchased the Menie estate in Balmedie in 2005 and promised to turn it into the “world’s greatest golf course”.
The ensuing disputes with neighbours became the subject of a documentary by the filmmaker Anthony Baxter, who was himself at one stage was arrested for trespassing while trying to conduct an interview.
Just before Mr Trump’s inauguration in January, David Milne, a neighbour of the course, told The Independent how in a dispute about the boundaries of his property, golf course staff had built a fence around his home – and sent him the bill.
Other neighbours have complained about the view from their property being blocked by a 15ft-high earth wall, and in 2010 Mr Trump flew to Aberdeen on his private Boeing 737 and told a packed press conference that the home of Balmedie local Michael Forbes was “a pigsty.” Mr Forbes was subsequently voted “Top Scot” in the Spirit of Scotland awards.
In the current court case, Ms Beyts has told Sheriff Corke that she had urgently needed to urinate and had thought she had done so out of sight, hidden in the sand dunes.
The court heard she had been using a recognised right of way, and had been careful to observe Scotland’s countryside access code.
Her lawyer Mr Dailly said: “It is understood under the code, once outdoors you’re allowed to relieve yourself responsibly.”
But the greenkeeper, Mr Irvine, who insisted to the court that he had only gone to the high ground at the eighth hole because of some grass that needed watering, spotted the environmental activist and golf course opponent, and photographed her.
He told the court: "I took her picture for evidence that she was urinating in a public place. I believed that it was a criminal offence to do that."
In her evidence, Ms Beyts said she was "shocked" to be told by police she had been filmed, leaving her "slightly paranoid" about urinating outside.
"I felt really quite upset,” she said, “Because I had taken all possible steps to ensure I wasn't viewed.”
Mr Motion, however, claimed that Ms Beyts’ wide publication of the events through the media and Facebook called into question whether they had caused her distress.
He said: "It seems somewhat ironic to demand compensation for a breach of privacy in such a public way.
"It may be that the true basis of the claim has been to publicise opposition to the course or possibly to stand up for the right to roam and the rights of walkers."
The case continues.