Here is a post I made which explains it in more detail
http://www.usdoingstuff.com/2011/07/06/accessing-the-current-session-in-a-customization/
*
*
*Thanks!*
*
*
*Jose C Gomez*
Software Engineer
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>
*Quis custodiet ipsos custodes?*
http://www.usdoingstuff.com/2011/07/06/accessing-the-current-session-in-a-customization/
*
*
*Thanks!*
*
*
*Jose C Gomez*
Software Engineer
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>
*Quis custodiet ipsos custodes?*
On Wed, Jul 6, 2011 at 7:51 PM, Jose Gomez <jose@...> wrote:
> You need to bring in the Core.Session and Core.BLConnect dll's Yo also need
> to cast your object to a session as ((Session)UDForm.Session).COmpany ID
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Wed, Jul 6, 2011 at 5:43 PM, edgarj.lopez <edgarj.lopez@...>wrote:
>
>> **
>>
>>
>> Hello Group
>>
>> I need a little help in c #
>>
>> I have developed some customizations in Visual Basic, on Vantage and E9.
>> I am currently developing some customizations in c #
>> but I have not really worked much with this language.
>>
>> The problem that I have is that
>> I do not understand how to reference the companyID in the program
>>
>> Here I leave a part of the program code
>>
>> private static void btnSupplier_Click(object sender, System.EventArgs
>> args)
>> {
>> // ** Place Event Handling Code Here **
>>
>> string WhereClause = "Company = '" + UD08Form.Session.CompanyID + "'";
>> bool recSelected = false;
>> DataSet dsSearch = new DataSet();
>>
>> dsSearch = Epicor.Mfg.UI.FormFunctions.SearchFunctions.listLookup(oTrans,
>> "VendorAdapter", out recSelected, true, WhereClause);
>>
>> if (recSelected)
>> {
>> edvUD08.dataView[edvUD08.Row]["ShortChar11"] =
>> dsSearch.Tables[0].Rows[0]["VendorId"];
>> edvUD08.Notify(new EpiNotifyArgs(oTrans, edvUD08.Row, edvUD08.Column));
>> txtSupplierName.Text = dsSearch.Tables[0].Rows[0]["Name"].ToString();
>> }
>> }
>>
>> And the error sent by the compiler
>>
>> Compiling Custom Code ...
>>
>> ----------errors------------
>>
>> Error: CS0117 - line 138 (1034) - 'object' does not contain a definition
>> for 'CompanyID'
>>
>> ** Compile Failed. **
>>
>> I do not understand why the error
>> if the statement is basically the same as in VB
>>
>> Any help will be greatly appreciated.
>>
>> regards
>>
>>
>>
>
>
[Non-text portions of this message have been removed]