Running Linq in E10 customization

The where clause nessarily will only return one record, so modifying only the first record would be fine.

However, you are right. The UD04.GetRows command does not load the dataset into the UD04 adapter. So, any idea how I could fix this?
Dim UD04ds As Ice.BO.UD04DataSet = UD04.GetRows(so, MorePages)
UD04ds.Ud04(0)("Checkbox17") = false
UD04ds.Ud04(0)("Date02") = Today()
UD04ds.Ud04(0)("RowMod") = "U"
UD04.Update()
UD04.Dispose()



Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...> | t: 520.881.2130 ext 2176

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 27, 2015 5:09 PM
To: Vantage
Subject: Re: [Vantage] Running Linq in E10 customization


You are only adddressing the first Row of your results... is that what you intended?
Als it looks like the get rows is returning a DataSet but that is not the sam dataset in your adapter?


Jose C Gomez
Software Engineer

T: 904.469.1524 mobile
E: jose@...<mailto:jose@...>
http://www.josecgomez.com
[Image removed by sender.]<http://www.linkedin.com/in/josecgomez> [Image removed by sender.] <http://www.facebook.com/josegomez> [Image removed by sender.] <http://www.google.com/profiles/jose.gomez> [Image removed by sender.] <http://www.twitter.com/joc85> [Image removed by sender.] <http://www.josecgomez.com/professional-resume/> [Image removed by sender.] <http://www.josecgomez.com/feed/>

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 7:12 PM, 'Tom J. Christie' tchristie@...<mailto:tchristie@...> [vantage] <vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>> wrote:

Alright, I’m trying the Get Rows method. Something is goofing up because the record is not getting modified by I’m not sure what’s up.

Dim Ud04 As UD04Adapter = New UD04Adapter(SOPickListForm)
Ud04.BOConnect()
Dim whereClause as string = "Key1 = " + row("OrderNum").tostring + " and Key2 = " + row("OrderLine").tostring + " and Key3 = " + row("OrderRelNum").tostring + ""
Messagebox.show("My where clause is " + whereclause)
Dim wcHash as System.Collections.Hashtable = new System.Collections.Hashtable(1)
wcHash.Add("ud04",whereClause)
Dim so as SearchOptions = new SearchOptions(SearchMode.AutoSearch)
so.DataSetMode = DataSetMode.RowsDataSet
so.NamedSearch.WhereClauses.Add(wcHash, whereClause)
dim morePages as boolean
Dim Ud04ds As Ice.BO.UD04DataSet = Ud04.GetRows(so, MorePages)
UD04ds.Ud04(0)("Checkbox17") = false
UD04ds.Ud04(0)("Date02") = Today()
UD04ds.Ud04(0)("RowMod") = "U"
UD04.Update()
Ud04.Dispose()

Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...> | t: 520.881.2130 ext 2176<tel:520.881.2130%20ext%202176>

From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>]
Sent: Wednesday, May 27, 2015 11:58 AM

To: Vantage
Subject: Re: [Vantage] Running Linq in E10 customization


Call the GetRows Method of the UD04 Adapter passing it that same where clause
and then set the values on each row along with the RowMod="U" and call the Update Method.

Also you can just write a BPM and call it from your button by passing in RowMod ="U" on the Main DataSet along with a "Flag" on CallContextBPMData for the trigger.


Jose C Gomez
Software Engineer

T: 904.469.1524<tel:904.469.1524> mobile
E: jose@...<mailto:jose@...>
http://www.josecgomez.com
[Image removed by sender.]<http://www.linkedin.com/in/josecgomez> [Image removed by sender.] <http://www.facebook.com/josegomez> [Image removed by sender.] <http://www.google.com/profiles/jose.gomez> [Image removed by sender.] <http://www.twitter.com/joc85> [Image removed by sender.] <http://www.josecgomez.com/professional-resume/> [Image removed by sender.] <http://www.josecgomez.com/feed/>

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 2:56 PM, 'Tom J. Christie' tchristie@...<mailto:tchristie@...> [vantage] <vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>> wrote:


I have some progress code that I was calling on a button click in E9.

I need to replicate this in E10. It is nothing fancy, but I’m at a loss for a clean way to do this in E10.


define var bFalse as logical.
define var dToday as date.
dToday = today.
bFalse = false.
for each orderrel where orderrel.checkbox05 = true.
for each ud04 where (ud04.key1 = string(orderrel.ordernum) and ud04.key2 = string(orderrel.orderline) and ud04.key3 = string(orderrel.orderrelnum)).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Checkbox17', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox05', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox06', True).
end.
end.


Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...><mailto:tchristie@...<mailto:tchristie@...>> | t: 520.881.2130 ext 2176<tel:520.881.2130%20ext%202176>

From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>]
Sent: Wednesday, May 27, 2015 11:51 AM
To: Vantage
Subject: Re: [Vantage] Running Linq in E10 customization


You can't
Db is the DB Context and as such you can't have it on your customization your customization is client side and it doesn't know or care about your Db. Be glad you can't do it , this would break and make things very angry if you could.
You can run Queries (BAQs) form your customization to do what you want, or call certain BO Methods.


Jose C Gomez
Software Engineer

T: 904.469.1524<tel:904.469.1524> mobile
E: jose@...<mailto:jose@...><mailto:jose@...<mailto:jose@...>>
http://www.josecgomez.com
[Image removed by sender.]<http://www.linkedin.com/in/josecgomez> [Image removed by sender.] <http://www.facebook.com/josegomez> [Image removed by sender.] <http://www.google.com/profiles/jose.gomez> [Image removed by sender.] <http://www.twitter.com/joc85> [Image removed by sender.] <http://www.josecgomez.com/professional-resume/> [Image removed by sender.] <http://www.josecgomez.com/feed/>

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 2:46 PM, 'Tom J. Christie' tchristie@...<mailto:tchristie@...><mailto:tchristie@...<mailto:tchristie@...>> [vantage] <vantage@yahoogroups.com<mailto:vantage@yahoogroups.com><mailto:vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>>> wrote:

I want to run a linq query in a customization.

Something like :

Dim myRows = From row in Db.OrderHed where row.OrderNum = 55 select row

However, Db does not seem to be in scope. What do? Do I need references or something?

Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...><mailto:tchristie@...<mailto:tchristie@...>> | t: 520.881.2130 ext 2176<tel:520.881.2130%20ext%202176><tel:520.881.2130%20ext%202176>




[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]

I want to run a linq query in a customization.

 

Something like :

 

Dim myRows = From row in Db.OrderHed where row.OrderNum = 55 select row

 

However, Db does not seem to be in scope. What do? Do I need references or something?

 

Regards,

 

Tom Christie |  Information Technology & Human Resources Manager  |  AGM Container Controls, Inc.  |   tchristie@...  | t: 520.881.2130 ext 2176

 

You can't
Db is the DB Context and as such you can't have it on your customization your customization is client side and it doesn't know or care about your Db. Be glad you can't do it , this would break and make things very angry if you could.
You can run Queries (BAQs) form your customization to do what you want, or call certain BO Methods.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 2:46 PM, 'Tom J. Christie' tchristie@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>

I want to run a linq query in a customization.

Â

Something like :

Â

Dim myRows = From row in Db.OrderHed where row.OrderNum = 55 select row

Â

However, Db does not seem to be in scope. What do? Do I need references or something?

Â

Regards,

Â

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc. |  tchristie@... | t: 520.881.2130 ext 2176

Â

</div>
 


<div style="color:#fff;min-height:0;"></div>

I have some progress code that I was calling on a button click in E9.

I need to replicate this in E10. It is nothing fancy, but I’m at a loss for a clean way to do this in E10.


define var bFalse as logical.
define var dToday as date.
dToday = today.
bFalse = false.
for each orderrel where orderrel.checkbox05 = true.
for each ud04 where (ud04.key1 = string(orderrel.ordernum) and ud04.key2 = string(orderrel.orderline) and ud04.key3 = string(orderrel.orderrelnum)).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Checkbox17', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox05', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox06', True).
end.
end.


Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...> | t: 520.881.2130 ext 2176

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 27, 2015 11:51 AM
To: Vantage
Subject: Re: [Vantage] Running Linq in E10 customization


You can't
Db is the DB Context and as such you can't have it on your customization your customization is client side and it doesn't know or care about your Db. Be glad you can't do it , this would break and make things very angry if you could.
You can run Queries (BAQs) form your customization to do what you want, or call certain BO Methods.


Jose C Gomez
Software Engineer

T: 904.469.1524 mobile
E: jose@...<mailto:jose@...>
http://www.josecgomez.com
[Image removed by sender.]<http://www.linkedin.com/in/josecgomez> [Image removed by sender.] <http://www.facebook.com/josegomez> [Image removed by sender.] <http://www.google.com/profiles/jose.gomez> [Image removed by sender.] <http://www.twitter.com/joc85> [Image removed by sender.] <http://www.josecgomez.com/professional-resume/> [Image removed by sender.] <http://www.josecgomez.com/feed/>

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 2:46 PM, 'Tom J. Christie' tchristie@...<mailto:tchristie@...> [vantage] <vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>> wrote:

I want to run a linq query in a customization.

Something like :

Dim myRows = From row in Db.OrderHed where row.OrderNum = 55 select row

However, Db does not seem to be in scope. What do? Do I need references or something?

Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...> | t: 520.881.2130 ext 2176<tel:520.881.2130%20ext%202176>





[Non-text portions of this message have been removed]
Call the GetRows Method of the UD04 Adapter passing it that same where clauseÂ
and then set the values on each row along with the RowMod="U" and call the Update Method.

Also you can just write a BPM and call it from your button by passing in RowMod ="U" on the Main DataSet along with a "Flag" on CallContextBPMData for the trigger.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 2:56 PM, 'Tom J. Christie' tchristie@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>I have some progress code that I was calling on a button click in E9.


I need to replicate this in E10. It is nothing fancy, but I’m at a loss for a clean way to do this in E10.


define var bFalse as logical.
define var dToday as date.
dToday = today.
bFalse = false.
for each orderrel where orderrel.checkbox05 = true.
for each ud04 where (ud04.key1 = string(orderrel.ordernum) and ud04.key2 = string(orderrel.orderline) and ud04.key3 = string(orderrel.orderrelnum)).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Checkbox17', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox05', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox06', True).
end.
end.


Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...> | t: 520.881.2130 ext 2176

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 27, 2015 11:51 AM
To: Vantage
Subject: Re: [Vantage] Running Linq in E10 customization


You can't
Db is the DB Context and as such you can't have it on your customization your customization is client side and it doesn't know or care about your Db. Be glad you can't do it , this would break and make things very angry if you could.
You can run Queries (BAQs) form your customization to do what you want, or call certain BO Methods.


Jose C Gomez
Software Engineer

T: 904.469.1524 mobile
E: jose@...<mailto:jose@...>
http://www.josecgomez.com
[Image removed by sender.]<http://www.linkedin.com/in/josecgomez> [Image removed by sender.] <http://www.facebook.com/josegomez> [Image removed by sender.] <http://www.google.com/profiles/jose.gomez> [Image removed by sender.] <http://www.twitter.com/joc85> [Image removed by sender.] <http://www.josecgomez.com/professional-resume/> [Image removed by sender.] <http://www.josecgomez.com/feed/>

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 2:46 PM, 'Tom J. Christie' tchristie@...<mailto:tchristie@...> [vantage] <vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>> wrote:

I want to run a linq query in a customization.

Something like :

Dim myRows = From row in Db.OrderHed where row.OrderNum = 55 select row

However, Db does not seem to be in scope. What do? Do I need references or something?

Regards,



Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@…<mailto:tchristie@…> | t: 520.881.2130 ext 2176<tel:520.881.2130%20ext%202176>





[Non-text portions of this message have been removed]

</div><span class="ygrps-yiv-753278665">
 


<div style="color:#fff;min-height:0;"></div>


This will get you started, you'll need to refer to programmers guide for everything else, but this should get you on your way if you are doing this in a BPM which is where I assume your progress code came from.


bool bFalse = false;
DateTime? dToday = null;
Erp.Tables.orderrel orderrel;
Ice.Tables.UD04 ud04;
dToday.Value = DateTime.Now;
bFalse = false;
foreach (var orderrel_iterator in (from orderrel_Row in Db.orderrel
                                   where (bool)orderrel_Row["checkbox05"] == true
                                   select orderrel_Row))
{
    orderrel = orderrel_iterator;
    foreach (var ud04_iterator in (from ud04_Row in Db.ud04
                                   where (ud04_Row.key1 == System.Convert.ToString(orderrel.ordernum) && ud04_Row.key2 == System.Convert.ToString(orderrel.orderline) && ud04_Row.key3 == System.Convert.ToString(orderrel.orderrelnum))
                                   select ud04_Row))
    {
        ud04 = ud04_iterator;
        ud04.Checkbox17 = bFalse;
        ud04.Date02 = dToday;
        orderrel.Date02 = dToday;
        orderrel.Checkbox05 = bFalse;
        orderrel.Checkbox06 = true;
    }
}

Alright, I’m trying the Get Rows method. Something is goofing up because the record is not getting modified by I’m not sure what’s up.

 

Dim Ud04 As UD04Adapter = New UD04Adapter(SOPickListForm)

                                                Ud04.BOConnect()

                                            Dim whereClause as string = "Key1 = " + row("OrderNum").tostring + " and Key2 = " + row("OrderLine").tostring + " and Key3 = " + row("OrderRelNum").tostring + ""

                                            Messagebox.show("My where clause is " + whereclause)

Dim wcHash as System.Collections.Hashtable = new System.Collections.Hashtable(1)

wcHash.Add("ud04",whereClause)

                                                  Dim so as SearchOptions = new SearchOptions(SearchMode.AutoSearch)

                                                 so.DataSetMode = DataSetMode.RowsDataSet

                                            so.NamedSearch.WhereClauses.Add(wcHash, whereClause)

                                            dim morePages as boolean

                                            Dim Ud04ds As Ice.BO.UD04DataSet =  Ud04.GetRows(so, MorePages)

                                                                                                UD04ds.Ud04(0)("Checkbox17") = false

                                                                                                UD04ds.Ud04(0)("Date02") = Today()

                                                                                                UD04ds.Ud04(0)("RowMod") = "U"

                                                                                                UD04.Update()

                                                                                    Ud04.Dispose()

 

Regards,

 

Tom Christie |  Information Technology & Human Resources Manager  |  AGM Container Controls, Inc.  |   tchristie@...  | t: 520.881.2130 ext 2176

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 27, 2015 11:58 AM
To: Vantage
Subject: Re: [Vantage] Running Linq in E10 customization

 

 

Call the GetRows Method of the UD04 Adapter passing it that same where clause 

and then set the values on each row along with the RowMod="U" and call the Update Method.

 

Also you can just write a BPM and call it from your button by passing in RowMod ="U" on the Main DataSet along with a "Flag" on CallContextBPMData for the trigger.



Jose C Gomez

Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?

 

On Wed, May 27, 2015 at 2:56 PM, 'Tom J. Christie' tchristie@... [vantage] <vantage@yahoogroups.com> wrote:

 

I have some progress code that I was calling on a button click in E9.

I need to replicate this in E10. It is nothing fancy, but I’m at a loss for a clean way to do this in E10.


define var bFalse as logical.
define var dToday as date.
dToday = today.
bFalse = false.
for each orderrel where orderrel.checkbox05 = true.
for each ud04 where (ud04.key1 = string(orderrel.ordernum) and ud04.key2 = string(orderrel.orderline) and ud04.key3 = string(orderrel.orderrelnum)).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Checkbox17', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox05', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox06', True).
end.
end.


Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...> | t: 520.881.2130 ext 2176

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 27, 2015 11:51 AM
To: Vantage
Subject: Re: [Vantage] Running Linq in E10 customization


You can't
Db is the DB Context and as such you can't have it on your customization your customization is client side and it doesn't know or care about your Db. Be glad you can't do it , this would break and make things very angry if you could.
You can run Queries (BAQs) form your customization to do what you want, or call certain BO Methods.


Jose C Gomez
Software Engineer

T: 904.469.1524 mobile
E: jose@...<mailto:jose@...>
http://www.josecgomez.com
[Image removed by sender.]<http://www.linkedin.com/in/josecgomez> [Image removed by sender.] <http://www.facebook.com/josegomez> [Image removed by sender.] <http://www.google.com/profiles/jose.gomez> [Image removed by sender.] <http://www.twitter.com/joc85> [Image removed by sender.] <http://www.josecgomez.com/professional-resume/> [Image removed by sender.] <http://www.josecgomez.com/feed/>

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 2:46 PM, 'Tom J. Christie' tchristie@...<mailto:tchristie@...> [vantage] <vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>> wrote:

I want to run a linq query in a customization.

Something like :

Dim myRows = From row in Db.OrderHed where row.OrderNum = 55 select row

However, Db does not seem to be in scope. What do? Do I need references or something?

Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...> | t: 520.881.2130 ext 2176<tel:520.881.2130%20ext%202176>




[Non-text portions of this message have been removed]

 

You are only adddressing the first Row of your results... is that what you intended?
Als it looks like the get rows is returning a DataSet but that is not the sam dataset in your adapter?


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 7:12 PM, 'Tom J. Christie' tchristie@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>

Alright, I’m trying the Get Rows method. Something is goofing up because the record is not getting modified by I’m not sure what’s up.

Â

Dim Ud04 As UD04Adapter = New UD04Adapter(SOPickListForm)

                                               Ud04.BOConnect()

                                          Dim whereClause as string = "Key1 = " + row("OrderNum").tostring + " and Key2 = " + row("OrderLine").tostring + " and Key3 = " + row("OrderRelNum").tostring + ""

                                          Messagebox.show("My where clause is " + whereclause)

Dim wcHash as System.Collections.Hashtable = new System.Collections.Hashtable(1)

wcHash.Add("ud04",whereClause)

                                               Dim so as SearchOptions = new SearchOptions(SearchMode.AutoSearch)

                                              so.DataSetMode = DataSetMode.RowsDataSet

                                          so.NamedSearch.WhereClauses.Add(wcHash, whereClause)

                                          dim morePages as boolean

                                          Dim Ud04ds As Ice.BO.UD04DataSet = Ud04.GetRows(so, MorePages)

                                                                                               UD04ds.Ud04(0)("Checkbox17") = false

                                                                                               UD04ds.Ud04(0)("Date02") = Today()

                                                                                               UD04ds.Ud04(0)("RowMod") = "U"

                                                                                               UD04.Update()

                                                                                  Ud04.Dispose()

Â

Regards,

Â

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc. |  tchristie@... | t: 520.881.2130 ext 2176

Â

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 27, 2015 11:58 AM


To: Vantage
Subject: Re: [Vantage] Running Linq in E10 customization

Â

Â

Call the GetRows Method of the UD04 Adapter passing it that same where clauseÂ

and then set the values on each row along with the RowMod="U" and call the Update Method.

Â

Also you can just write a BPM and call it from your button by passing in RowMod ="U" on the Main DataSet along with a "Flag" on CallContextBPMData for the trigger.



Jose C Gomez

Software Engineer


T: 904.469.1524 mobile

E: jose@...
http://www.josecgomez.com
 Â
   Â


Quis custodiet ipsos custodes?

Â

On Wed, May 27, 2015 at 2:56 PM, 'Tom J. Christie' tchristie@... [vantage] <vantage@yahoogroups.com> wrote:

Â

I have some progress code that I was calling on a button click in E9.

I need to replicate this in E10. It is nothing fancy, but I’m at a loss for a clean way to do this in E10.


define var bFalse as logical.
define var dToday as date.
dToday = today.
bFalse = false.
for each orderrel where orderrel.checkbox05 = true.
for each ud04 where (ud04.key1 = string(orderrel.ordernum) and ud04.key2 = string(orderrel.orderline) and ud04.key3 = string(orderrel.orderrelnum)).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Checkbox17', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER UD04:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Date02', dToday).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox05', bFalse).
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'Checkbox06', True).
end.
end.


Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...> | t: 520.881.2130 ext 2176

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 27, 2015 11:51 AM
To: Vantage
Subject: Re: [Vantage] Running Linq in E10 customization


You can't
Db is the DB Context and as such you can't have it on your customization your customization is client side and it doesn't know or care about your Db. Be glad you can't do it , this would break and make things very angry if you could.
You can run Queries (BAQs) form your customization to do what you want, or call certain BO Methods.


Jose C Gomez
Software Engineer

T: 904.469.1524 mobile
E: jose@...<mailto:jose@...>
http://www.josecgomez.com
[Image removed by sender.]<http://www.linkedin.com/in/josecgomez> [Image removed by sender.] <http://www.facebook.com/josegomez> [Image removed by sender.] <http://www.google.com/profiles/jose.gomez> [Image removed by sender.] <http://www.twitter.com/joc85> [Image removed by sender.] <http://www.josecgomez.com/professional-resume/> [Image removed by sender.] <http://www.josecgomez.com/feed/>

Quis custodiet ipsos custodes?

On Wed, May 27, 2015 at 2:46 PM, 'Tom J. Christie' tchristie@...<mailto:tchristie@...> [vantage] <vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>> wrote:

I want to run a linq query in a customization.

Something like :

Dim myRows = From row in Db.OrderHed where row.OrderNum = 55 select row

However, Db does not seem to be in scope. What do? Do I need references or something?

Regards,

Tom Christie | Information Technology & Human Resources Manager | AGM Container Controls, Inc.<http://www.agmcontainer.com/> | tchristie@...<mailto:tchristie@...> | t: 520.881.2130 ext 2176<tel:520.881.2130%20ext%202176>




[Non-text portions of this message have been removed]

Â

</div><div><div class="ygrps-yiv-273796248h5">
 


<div style="color:#fff;min-height:0;"></div>