Try using changecompany(p_strDataAreaID){ ... } I've try to use changecompany syntax 
in a looping, but the company didn't changed properly and solved by placing the code 
in a different method.
// source code:
loop {
  changecompany(..)
  {
  ... // didn't work properly
  }
}

solved using new method:
private void processDataAreaID(strID)
{
  changecompany(strID)
  {
     ... // selection in this area will work on dataareaid == strID
  }
}

// source code:
loop {
  processDataAreaID(strID);
}


For further information, see changecompany help.


Sonny Wibawa Adi

"Stefan Lundquist (Priv)" <[EMAIL PROTECTED]> wrote:

you have to use the global ChangeCompany() method. More info can be found on Technet.

/Stefan

-----Ursprungligt meddelande-----
Från: eva_aksnes [mailto:[EMAIL PROTECTED]
Skickat: den 23 december 2003 12:48
Till: [EMAIL PROTECTED]
Ämne: [development-axapta] Select data from a different company


How can I make a select of data in a different company?
I want - in a parameters table - that there should be only one company which will be able to have an noyes-enum checked. How do you suggest that I write this check?


I've tried code like this, but it did not seem to work:
select firstonly p where p.dataAreaId != curext() && p.noyesid;
if(p)
  return checkFailed("This is already selected in another company");



_____

Yahoo! Groups Links


* To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.






_____

Yahoo! Groups Links


* To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



_____


Do you Yahoo!?
Free Pop-Up Blocker - Get it now


Yahoo! Groups Sponsor ADVERTISEMENT
click here


_____

Yahoo! Groups Links


* To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




Reply via email to