AWESOME :D Great Teamwork!!
Brenda
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of lisassar
Sent: Monday, May 06, 2013 3:45 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: BPM Quote/Order Entry to populate and calculate net weight
Hi Brenda,
I finally got it to work, as you said I was missing the "enable....", don't know how i could miss that...
Also needed to change a bit in the code with temp tables and stuff.
But without you I wouldn't have solved it!! Thank you!!
//Lisa
Brenda
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of lisassar
Sent: Monday, May 06, 2013 3:45 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: BPM Quote/Order Entry to populate and calculate net weight
Hi Brenda,
I finally got it to work, as you said I was missing the "enable....", don't know how i could miss that...
Also needed to change a bit in the code with temp tables and stuff.
But without you I wouldn't have solved it!! Thank you!!
//Lisa
--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, brenda mohr <brenda@...<mailto:brenda@...>> wrote:
>
> You also need "enable dependent post process directives" on the GetNetWeight Pre Processing Actions I believe.
>
> You might also try taking out the (OrderDtl.PartNum <>?) because the orderDtl.partnum = ttCallContextBPMData.ShortChar01 should take care of that.
>
> Brenda
>
> From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of lisassar
> Sent: Monday, May 06, 2013 10:29 AM
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] Re: BPM Quote/Order Entry to populate and calculate net weight
>
>
>
> Yes, I tried showing a infomessage but even that wouldn't show the the BPM data condition.
>
> SalesOrder.ChangePartNumMaster
> pre processing:
> set the ShortChar01 field of BPM Data to the ttOrderDtl.PartNum expression
>
> post processing:
> this directive has been enabled from the GetNetWeight directive
>
> Sync. Execute ablcode:
>
> fOR EACH OrderDtl WHERE (OrderDtl.Company = CUR-COMP) AND (OrderDtl.PartNum <>?) and orderDtl.partnum = ttCallContextBPMData.ShortChar01 exclusive-lock.
>
> Find first part where part.Company = OrderDtl.Company and part.PartNum = orderdtl.PartNum.
> if available part then do:
>
> assign orderdtl.Number10 = part.NetWeight.
>
> end.
>
> end.
>
> --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>, brenda mohr <brenda@<mailto:brenda@>> wrote:
> >
> > Did you "enable dependent post process directives" on the Pre Actions? I usually do this at the same time I set the BPM field.
> >
> >
> > Brenda
> >
> > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of lisassar
> > Sent: Monday, May 06, 2013 9:53 AM
> > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
> > Subject: [Vantage] Re: BPM Quote/Order Entry to populate and calculate net weight
> >
> >
> >
> > Hi again,
> >
> > I tried your solution but the pre processing stops the post processing from running. It doesn't trigger anything to start from the post processing..
> >
> > Any other ideas?
> >
> > Kind regards,
> > Lisa
> >
> > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>, "lisassar" <lisa.saren@<mailto:lisa.saren@<mailto:lisa.saren@%3cmailto:lisa.saren@<mailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@>>>> wrote:
> > >
> > > Hi again and thanks for you reply!!
> > >
> > > partNum is a parameter i get from the Quote.ChangePartNum method, the partnum I'm choosing.
> > >
> > > First of all i'm trying to get the net weight from the part that im choosing to the ud-field quotedtl.number10, that works fine (it does show in the numberfield), but it doesn't save properly.
> > >
> > > I should maybe try to change the real data table then, I think i tried it but I've been trying so many things now so i don't really know what i'm doing any more :)
> > >
> > > Kind regards,
> > > Lisa
> > >
> > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>, brenda mohr <brenda@> wrote:
> > > >
> > > > Having said that, I am not sure if you can "get there from here".
> > > >
> > > > I am trying to figure out your code. What exactly do you want to happen on what trigger? Your code is: for each ttOrderDtl where ttOrderdtl.PartNum = partNum - but what is partNum? Did you declare a variable prior to this statement?
> > > >
> > > > The Quote.ChangePartNum doesn't really seem to lend itself you what you are trying to do. You need an exclusive-lock to write to a table. And the tt table may not actually get updated on the POST process w/out an update trigger for that BO update. So you could probably write directly to the table if you are only updating a UD field. The only problem with Post I have found is being very sure you are writing to the record you really want. So I throw the compare value into a BPM field and then use that as a key per se. For example:
> > > >
> > > > On the Pre put the Action:
> > > >
> > > > set the ShortChar01 field of BPM Data to the ttQuoteDtl.PartNum expression
> > > >
> > > > Then in place of partNum, you would use ttCallContextBPMData.ShortChar01.
> > > >
> > > > So you would end up with:
> > > >
> > > > FOR EACH OrderDtl WHERE (OrderDtl.Company = CUR-COMP) AND (OrderDtl.PartNum = ttCallContextBPMData.ShortChar01) AND (OrderDtl.PartNum <>?) exclusive-lock.
> > > >
> > > > FIND FIRST Part WHERE (Part.Company = OrderDtl.Company) AND (Part.PartNum = OrderDtl.PartNum) no-error.
> > > > IF AVAILABLE Part THEN DO:
> > > > Assign OrderDtl.Number10 = Part.NetWeight.
> > > > END.
> > > >
> > > > END.
> > > >
> > > > Be sure I am following what you are trying to do, before you plug in my code though... :D
> > > >
> > > > Brenda
> > > >
> > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of lisassar
> > > > Sent: Monday, May 06, 2013 6:38 AM
> > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
> > > > Subject: [Vantage] Re: BPM Quote/Order Entry to populate and calculate net weight
> > > >
> > > >
> > > >
> > > > Hi Brenda!
> > > >
> > > > Which fields do you mean "one of the BPM fields"?
> > > >
> > > > //Lisa
> > > >
> > > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>, brenda mohr <brenda@<mailto:brenda@>> wrote:
> > > > >
> > > > > When it gives me heartache, I throw the value into one of the BPM fields and then update it via the BPM actions.
> > > > >
> > > > > Brenda
> > > > >
> > > > > From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>] On Behalf Of lisassar
> > > > > Sent: Monday, May 06, 2013 5:03 AM
> > > > > To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>
> > > > > Subject: [Vantage] Re: BPM Quote/Order Entry to populate and calculate net weight
> > > > >
> > > > >
> > > > >
> > > > > Hello again,
> > > > >
> > > > > I've done a BAQ on the data fields that I've used for the calculation and it doesn't seem to save my values at all.
> > > > >
> > > > > Is it not possible to assign data to a field in a post processing?
> > > > >
> > > > > For example this BPM post processing on Quote.ChangePartNum:
> > > > >
> > > > > for each ttOrderDtl where ttOrderdtl.PartNum = partNum and ttOrderDtl.Company = cur-comp and ttOrderDtl.PartNum <>? no-lock.
> > > > >
> > > > > Find first part where part.Company = ttOrderDtl.Company and part.PartNum = ttorderdtl.PartNum.
> > > > >
> > > > > if available part then do:
> > > > > assign ttorderdtl.Number10 = part.NetWeight.
> > > > >
> > > > > end.
> > > > > end.
> > > > >
> > > > > Kind regards,
> > > > > Lisa
> > > > >
> > > > > --- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com><mailto:vantage%40yahoogroups.com>, "lisassar" <lisa.saren@<mailto:lisa.saren@<mailto:lisa.saren@%3cmailto:lisa.saren@<mailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@<mailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@<mailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@%3cmailto:lisa.saren@>>>>>> wrote:
> > > > > >
> > > > > > Hello experts!
> > > > > >
> > > > > > I've created a BPM post processing on the QuoteHed.Update and OrderHed.Update to calculate the values of the net weights (Part.NetWeight) for the lines of parts on the Quote/Order. It works just fine if I add new lines (it does the calculation correct). But if i delete one line the total net weight becomes zero. When I try to log it it does the right calculation but it doesn't seem to saves for the Quote.GetById method that runs after Quote.Update when you delete a line. What could be the problem here?
> > > > > >
> > > > > > I have the same issue when opening a order/quote, the total weight doesn't show if i don't make a change and update to the order/quote.
> > > > > >
> > > > > > What have i done wrong here? Should I use a pre-processing instead?
> > > > > >
> > > > > > I can copy my code in if anybody would like.
> > > > > >
> > > > > > Kind regards,
> > > > > > Lisa
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > [Non-text portions of this message have been removed]
> > > > >
> > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
> [Non-text portions of this message have been removed]
>
[Non-text portions of this message have been removed]