Configurator problem

I was thinking I could use the configurator to update a UD field within the quote screen, then run a bpm that checks for that being set during the quote.update, then updating the partplant etc.

erwin

--- In vantage@yahoogroups.com, "jckinneman" <jckinneman@...> wrote:
>
> I work with the product configurator all the time and determining when and where something happens presents some challenges.
>
> At the time the on-leave statement fires, the new part doesn't exist yet. You can use rules at the top level of your MOM to make changes to the part record. Unfortunately the partplant record doesn't isn't available as one of the choices. I haven't look at all the fields that you can update on the part record recently but several of them cascade down to lower level records when a part is created. The field you want to update 'may' be one of them.
>
> Otherwise to have the configurator update the partplant record we would need to figure out when the part record is created. It likely happens AFTER the rules fire which is too late to intercept it within the configurator. As another reply mentions you might be able to use a BPM to update the partplant record after the part is created.
>
> I'd turn on the trace log and see which Business Object are used to create the part.
>
> While using a BPM is probably the more elegant/recommended solution for some using embedded customization is easier to implement. You could use an embedded customization that runs after the call to the configurator. One trick is to trap the click on the "configuration" button. Since this is an Epicor provided control when you trap the click, your "click" code runs AFTER Epicor's code. In effect your click is an AfterClick event. If you take this approach there are 4 configuration buttons on the order entry, two on top of each other on the summary grid and two on top of each other on the detail tab.
>
> Hope this help, let me know if I can be of any further assistance.
>
> Jim Kinneman
> En>compass Solutions Inc.
> Tel 336.207.7166
> Fax 336.217.7983
> E-mail jimki@...
> www.encompass-inc.com
>
>
> --- In vantage@yahoogroups.com, "bonner.nathan" <bonner.n@> wrote:
> >
> > Erwin,
> >
> > I am not convinced that your 'Non-Stock' update table buffer is working either. I think what you are seeing is the default behavior of a new PartPlant record on this field.
> >
> > Are you sure that the Part and PartPlant records have already been created at the time your code is firing?
> >
> > I suggest that you add some info messages in your code to let you know if you are finding your target at the time the code is being called.
> >
> > First add the following to your "If available PartPlant then do:"
> >
> > {lib/PublishInfoMsg.i &InfoMsg = "'PartPlant record found.'"}.
> >
> > To test the alternative to "If available PartPlant then do:" I would add something like the following after your first info message;
> >
> > End. /*available PartPlant*/
> > If not available PartPlant then do:
> > {lib/PublishInfoMsg.i &InfoMsg = "'PartPlant record not available.'"}.
> > End. /*not available PartPlant*/
> >
> > I haven't used this info message lately so some fine tuning on the syntax may be required but this should give you some confirmation of whether you are finding your record or not.
> >
> > If you are not finding your record but are convinced that the record has been created at the time your code is being called, revisit your join:
> >
> > Find First QuoteDtl where QuoteDtl.Company = vCompany and Quotedtl.QuoteNum = vQuoteNum and Quotedtl.QuoteLine = vQuoteLine no-lock no-error.
> >
> > I think the "First" is not required here but is likely not the problem.
> >
> > Find First PartPlant where PartPlant.Company = vCompany and PartPlant.PartNum = Quotedtl.PartNum no-lock no-error.
> >
> > I suspect your problem is here.
> >
> > Try a joins similar to this as BAQ's until you are getting the records returned that you want your Configurator code to find. The join you end up with in the BAQ Query Phrase can be copied into your code and be slightly modified to reflect your temp table names.
> >
> > Let me know how this works out for you...
> >
> > Nathan Bonner
> > Business Systems Analyst
> > Total Plastics, Inc.
> > bonner.nathan@
> > totalplastics.com
> > 269-553-5838
> >
> >
> >
> >
> > --- In vantage@yahoogroups.com, "erwinjw" <erwinjw@> wrote:
> > >
> > > I am trying to set the Planner value in the PartPlant Tab of the part screen for a newly created configured part.
> > >
> > > I am using the code below in the page leave event of the final page of the configurator. The 'NonStock' flag is being set correctly but the 'PersonID' is remaining blank. The source part that we are using for the configurator has a planner set in this field, but the resultant part created through the configurator has a blank Planner value.
> > >
> > > any help would be appreciated.
> > >
> > > def var vQuoteNum as integer no-undo.
> > > def var vQuoteLine as integer no-undo.
> > > def var vCompany as character no-undo.
> > > vQuoteNum = GetCurrentQuoteNum().
> > > vQuoteLine = GetCurrentQuoteLine().
> > > vCompany = GetCurrentCompany().
> > > If vQuoteNum > 0 and vQuoteLine > 0 then do:
> > > Find First QuoteDtl where QuoteDtl.Company = vCompany and Quotedtl.QuoteNum = vQuoteNum and Quotedtl.QuoteLine = vQuoteLine no-lock no-error.
> > > If available QuoteDtl then do:
> > > Find First PartPlant where PartPlant.Company = vCompany and PartPlant.PartNum = Quotedtl.PartNum no-lock no-error.
> > > If available PartPlant then do:
> > > run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'NonStock',"No").
> > > run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'PersonID',"MStock").
> > > End. /* available PartPlant */
> > > End. /* available OrderDtl */
> > > End. /* OrderNum > 0 and OrderLine > 0 */
> > >
> > > any help would be appreciated
> > >
> > > erwin w
> > >
> >
>
I am trying to set the Planner value in the PartPlant Tab of the part screen for a newly created configured part.

I am using the code below in the page leave event of the final page of the configurator. The 'NonStock' flag is being set correctly but the 'PersonID' is remaining blank. The source part that we are using for the configurator has a planner set in this field, but the resultant part created through the configurator has a blank Planner value.

any help would be appreciated.

def var vQuoteNum as integer no-undo.
def var vQuoteLine as integer no-undo.
def var vCompany as character no-undo.
vQuoteNum = GetCurrentQuoteNum().
vQuoteLine = GetCurrentQuoteLine().
vCompany = GetCurrentCompany().
If vQuoteNum > 0 and vQuoteLine > 0 then do:
Find First QuoteDtl where QuoteDtl.Company = vCompany and Quotedtl.QuoteNum = vQuoteNum and Quotedtl.QuoteLine = vQuoteLine no-lock no-error.
If available QuoteDtl then do:
Find First PartPlant where PartPlant.Company = vCompany and PartPlant.PartNum = Quotedtl.PartNum no-lock no-error.
If available PartPlant then do:
run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'NonStock',"No").
run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'PersonID',"MStock").
End. /* available PartPlant */
End. /* available OrderDtl */
End. /* OrderNum > 0 and OrderLine > 0 */

any help would be appreciated

erwin w
Hi Erwin,

> I am trying to set the Planner value in the PartPlant Tab of
> the part screen for a newly created configured part.
>
> I am using the code below in the page leave event of the
> final page of the configurator. The 'NonStock' flag is being
> set correctly but the 'PersonID' is remaining blank. The
> source part that we are using for the configurator has a
> planner set in this field, but the resultant part created
> through the configurator has a blank Planner value.

Any reason you're using the updatetablebuffer routine instead of a Set Field
rule? If the new part doesn't exist yet then the update table buffer program
won't find it to change it.

Which version of Vantage are you running?

Mark W.
Hi

The Set Field Rule only applies to the Part you can't access the PartPlant record. The strange thing is that base part is non-stocked, but I can set the "new" Part to stocked with a Rule and the PartPlant to stocked but am unable to populate the planner field.

We are on 8.03.403D

erwin

--- In vantage@yahoogroups.com, "Mark Wonsil" <mark_wonsil@...> wrote:
>
> Hi Erwin,
>
> > I am trying to set the Planner value in the PartPlant Tab of
> > the part screen for a newly created configured part.
> >
> > I am using the code below in the page leave event of the
> > final page of the configurator. The 'NonStock' flag is being
> > set correctly but the 'PersonID' is remaining blank. The
> > source part that we are using for the configurator has a
> > planner set in this field, but the resultant part created
> > through the configurator has a blank Planner value.
>
> Any reason you're using the updatetablebuffer routine instead of a Set Field
> rule? If the new part doesn't exist yet then the update table buffer program
> won't find it to change it.
>
> Which version of Vantage are you running?
>
> Mark W.
>
Hi Erwin,

> The Set Field Rule only applies to the Part you can't access
> the PartPlant record.

That's right. You are correct.

> The strange thing is that base part is
> non-stocked, but I can set the "new" Part to stocked with a
> Rule and the PartPlant to stocked but am unable to populate the
> planner field.

Yeah, one can set a default stockable flag at the part level but not a
planner.

Hmm. I wonder if you could do a set field on one of the user defined fields
and use that as a trigger in a BPM to set the planner code?

> We are on 8.03.403D

Oh sure, sit on a stable release...

;-)

9.04.504 came out yesterday. Off to the test machine...

Mark W.
We are goingto upgrade to the latest patch but are waiting on delivery of some scheduling customisations from Epicor, and have waited some time...

erwin

--- In vantage@yahoogroups.com, "Mark Wonsil" <mark_wonsil@...> wrote:
>
> Hi Erwin,
>
> > The Set Field Rule only applies to the Part you can't access
> > the PartPlant record.
>
> That's right. You are correct.
>
> > The strange thing is that base part is
> > non-stocked, but I can set the "new" Part to stocked with a
> > Rule and the PartPlant to stocked but am unable to populate the
> > planner field.
>
> Yeah, one can set a default stockable flag at the part level but not a
> planner.
>
> Hmm. I wonder if you could do a set field on one of the user defined fields
> and use that as a trigger in a BPM to set the planner code?
>
> > We are on 8.03.403D
>
> Oh sure, sit on a stable release...
>
> ;-)
>
> 9.04.504 came out yesterday. Off to the test machine...
>
> Mark W.
>
Tested the code (as supplied by Epicor consultant)and you are correct the PartPlant record does not yet exist, looks like its a bpm to sort this out. Though why it doesn't take the planner code of the base part is another question.

erwin
--- In vantage@yahoogroups.com, "Mark Wonsil" <mark_wonsil@...> wrote:
>
> Hi Erwin,
>
> > The Set Field Rule only applies to the Part you can't access
> > the PartPlant record.
>
> That's right. You are correct.
>
> > The strange thing is that base part is
> > non-stocked, but I can set the "new" Part to stocked with a
> > Rule and the PartPlant to stocked but am unable to populate the
> > planner field.
>
> Yeah, one can set a default stockable flag at the part level but not a
> planner.
>
> Hmm. I wonder if you could do a set field on one of the user defined fields
> and use that as a trigger in a BPM to set the planner code?
>
> > We are on 8.03.403D
>
> Oh sure, sit on a stable release...
>
> ;-)
>
> 9.04.504 came out yesterday. Off to the test machine...
>
> Mark W.
>
Erwin,

I am not convinced that your 'Non-Stock' update table buffer is working either. I think what you are seeing is the default behavior of a new PartPlant record on this field.

Are you sure that the Part and PartPlant records have already been created at the time your code is firing?

I suggest that you add some info messages in your code to let you know if you are finding your target at the time the code is being called.

First add the following to your "If available PartPlant then do:"

{lib/PublishInfoMsg.i &InfoMsg = "'PartPlant record found.'"}.

To test the alternative to "If available PartPlant then do:" I would add something like the following after your first info message;

End. /*available PartPlant*/
If not available PartPlant then do:
{lib/PublishInfoMsg.i &InfoMsg = "'PartPlant record not available.'"}.
End. /*not available PartPlant*/

I haven't used this info message lately so some fine tuning on the syntax may be required but this should give you some confirmation of whether you are finding your record or not.

If you are not finding your record but are convinced that the record has been created at the time your code is being called, revisit your join:

Find First QuoteDtl where QuoteDtl.Company = vCompany and Quotedtl.QuoteNum = vQuoteNum and Quotedtl.QuoteLine = vQuoteLine no-lock no-error.

I think the "First" is not required here but is likely not the problem.

Find First PartPlant where PartPlant.Company = vCompany and PartPlant.PartNum = Quotedtl.PartNum no-lock no-error.

I suspect your problem is here.

Try a joins similar to this as BAQ's until you are getting the records returned that you want your Configurator code to find. The join you end up with in the BAQ Query Phrase can be copied into your code and be slightly modified to reflect your temp table names.

Let me know how this works out for you...

Nathan Bonner
Business Systems Analyst
Total Plastics, Inc.
bonner.nathan@
totalplastics.com
269-553-5838




--- In vantage@yahoogroups.com, "erwinjw" <erwinjw@...> wrote:
>
> I am trying to set the Planner value in the PartPlant Tab of the part screen for a newly created configured part.
>
> I am using the code below in the page leave event of the final page of the configurator. The 'NonStock' flag is being set correctly but the 'PersonID' is remaining blank. The source part that we are using for the configurator has a planner set in this field, but the resultant part created through the configurator has a blank Planner value.
>
> any help would be appreciated.
>
> def var vQuoteNum as integer no-undo.
> def var vQuoteLine as integer no-undo.
> def var vCompany as character no-undo.
> vQuoteNum = GetCurrentQuoteNum().
> vQuoteLine = GetCurrentQuoteLine().
> vCompany = GetCurrentCompany().
> If vQuoteNum > 0 and vQuoteLine > 0 then do:
> Find First QuoteDtl where QuoteDtl.Company = vCompany and Quotedtl.QuoteNum = vQuoteNum and Quotedtl.QuoteLine = vQuoteLine no-lock no-error.
> If available QuoteDtl then do:
> Find First PartPlant where PartPlant.Company = vCompany and PartPlant.PartNum = Quotedtl.PartNum no-lock no-error.
> If available PartPlant then do:
> run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'NonStock',"No").
> run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'PersonID',"MStock").
> End. /* available PartPlant */
> End. /* available OrderDtl */
> End. /* OrderNum > 0 and OrderLine > 0 */
>
> any help would be appreciated
>
> erwin w
>
I have discovered that this code doesn't work. I have logged the fact that the personid isn't getting picked up, and you are correct the other fields are being copied \ pulled over from the base.

However, if we set a default planner on the product group the planner appears on the job when the job is created.

I have logged a call with epicor support about the partplant. But it is the Job where we want the planner so we can filter these jobs off. There will be about 3000 jobs of this type per annum, on top of these orders we handle about 10000 bespoke jobs annum and we need to ensure that the planning\releasing etc is handled by the correct guys on the shop floor.

thanks for the help.

erwin

--- In vantage@yahoogroups.com, "bonner.nathan" <bonner.n@...> wrote:
>
> Erwin,
>
> I am not convinced that your 'Non-Stock' update table buffer is working either. I think what you are seeing is the default behavior of a new PartPlant record on this field.
>
> Are you sure that the Part and PartPlant records have already been created at the time your code is firing?
>
> I suggest that you add some info messages in your code to let you know if you are finding your target at the time the code is being called.
>
> First add the following to your "If available PartPlant then do:"
>
> {lib/PublishInfoMsg.i &InfoMsg = "'PartPlant record found.'"}.
>
> To test the alternative to "If available PartPlant then do:" I would add something like the following after your first info message;
>
> End. /*available PartPlant*/
> If not available PartPlant then do:
> {lib/PublishInfoMsg.i &InfoMsg = "'PartPlant record not available.'"}.
> End. /*not available PartPlant*/
>
> I haven't used this info message lately so some fine tuning on the syntax may be required but this should give you some confirmation of whether you are finding your record or not.
>
> If you are not finding your record but are convinced that the record has been created at the time your code is being called, revisit your join:
>
> Find First QuoteDtl where QuoteDtl.Company = vCompany and Quotedtl.QuoteNum = vQuoteNum and Quotedtl.QuoteLine = vQuoteLine no-lock no-error.
>
> I think the "First" is not required here but is likely not the problem.
>
> Find First PartPlant where PartPlant.Company = vCompany and PartPlant.PartNum = Quotedtl.PartNum no-lock no-error.
>
> I suspect your problem is here.
>
> Try a joins similar to this as BAQ's until you are getting the records returned that you want your Configurator code to find. The join you end up with in the BAQ Query Phrase can be copied into your code and be slightly modified to reflect your temp table names.
>
> Let me know how this works out for you...
>
> Nathan Bonner
> Business Systems Analyst
> Total Plastics, Inc.
> bonner.nathan@
> totalplastics.com
> 269-553-5838
>
>
>
>
> --- In vantage@yahoogroups.com, "erwinjw" <erwinjw@> wrote:
> >
> > I am trying to set the Planner value in the PartPlant Tab of the part screen for a newly created configured part.
> >
> > I am using the code below in the page leave event of the final page of the configurator. The 'NonStock' flag is being set correctly but the 'PersonID' is remaining blank. The source part that we are using for the configurator has a planner set in this field, but the resultant part created through the configurator has a blank Planner value.
> >
> > any help would be appreciated.
> >
> > def var vQuoteNum as integer no-undo.
> > def var vQuoteLine as integer no-undo.
> > def var vCompany as character no-undo.
> > vQuoteNum = GetCurrentQuoteNum().
> > vQuoteLine = GetCurrentQuoteLine().
> > vCompany = GetCurrentCompany().
> > If vQuoteNum > 0 and vQuoteLine > 0 then do:
> > Find First QuoteDtl where QuoteDtl.Company = vCompany and Quotedtl.QuoteNum = vQuoteNum and Quotedtl.QuoteLine = vQuoteLine no-lock no-error.
> > If available QuoteDtl then do:
> > Find First PartPlant where PartPlant.Company = vCompany and PartPlant.PartNum = Quotedtl.PartNum no-lock no-error.
> > If available PartPlant then do:
> > run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'NonStock',"No").
> > run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'PersonID',"MStock").
> > End. /* available PartPlant */
> > End. /* available OrderDtl */
> > End. /* OrderNum > 0 and OrderLine > 0 */
> >
> > any help would be appreciated
> >
> > erwin w
> >
>
I work with the product configurator all the time and determining when and where something happens presents some challenges.

At the time the on-leave statement fires, the new part doesn't exist yet. You can use rules at the top level of your MOM to make changes to the part record. Unfortunately the partplant record doesn't isn't available as one of the choices. I haven't look at all the fields that you can update on the part record recently but several of them cascade down to lower level records when a part is created. The field you want to update 'may' be one of them.

Otherwise to have the configurator update the partplant record we would need to figure out when the part record is created. It likely happens AFTER the rules fire which is too late to intercept it within the configurator. As another reply mentions you might be able to use a BPM to update the partplant record after the part is created.

I'd turn on the trace log and see which Business Object are used to create the part.

While using a BPM is probably the more elegant/recommended solution for some using embedded customization is easier to implement. You could use an embedded customization that runs after the call to the configurator. One trick is to trap the click on the "configuration" button. Since this is an Epicor provided control when you trap the click, your "click" code runs AFTER Epicor's code. In effect your click is an AfterClick event. If you take this approach there are 4 configuration buttons on the order entry, two on top of each other on the summary grid and two on top of each other on the detail tab.

Hope this help, let me know if I can be of any further assistance.

Jim Kinneman
En>compass Solutions Inc.
Tel 336.207.7166
Fax 336.217.7983
E-mail jimki@...
www.encompass-inc.com


--- In vantage@yahoogroups.com, "bonner.nathan" <bonner.n@...> wrote:
>
> Erwin,
>
> I am not convinced that your 'Non-Stock' update table buffer is working either. I think what you are seeing is the default behavior of a new PartPlant record on this field.
>
> Are you sure that the Part and PartPlant records have already been created at the time your code is firing?
>
> I suggest that you add some info messages in your code to let you know if you are finding your target at the time the code is being called.
>
> First add the following to your "If available PartPlant then do:"
>
> {lib/PublishInfoMsg.i &InfoMsg = "'PartPlant record found.'"}.
>
> To test the alternative to "If available PartPlant then do:" I would add something like the following after your first info message;
>
> End. /*available PartPlant*/
> If not available PartPlant then do:
> {lib/PublishInfoMsg.i &InfoMsg = "'PartPlant record not available.'"}.
> End. /*not available PartPlant*/
>
> I haven't used this info message lately so some fine tuning on the syntax may be required but this should give you some confirmation of whether you are finding your record or not.
>
> If you are not finding your record but are convinced that the record has been created at the time your code is being called, revisit your join:
>
> Find First QuoteDtl where QuoteDtl.Company = vCompany and Quotedtl.QuoteNum = vQuoteNum and Quotedtl.QuoteLine = vQuoteLine no-lock no-error.
>
> I think the "First" is not required here but is likely not the problem.
>
> Find First PartPlant where PartPlant.Company = vCompany and PartPlant.PartNum = Quotedtl.PartNum no-lock no-error.
>
> I suspect your problem is here.
>
> Try a joins similar to this as BAQ's until you are getting the records returned that you want your Configurator code to find. The join you end up with in the BAQ Query Phrase can be copied into your code and be slightly modified to reflect your temp table names.
>
> Let me know how this works out for you...
>
> Nathan Bonner
> Business Systems Analyst
> Total Plastics, Inc.
> bonner.nathan@
> totalplastics.com
> 269-553-5838
>
>
>
>
> --- In vantage@yahoogroups.com, "erwinjw" <erwinjw@> wrote:
> >
> > I am trying to set the Planner value in the PartPlant Tab of the part screen for a newly created configured part.
> >
> > I am using the code below in the page leave event of the final page of the configurator. The 'NonStock' flag is being set correctly but the 'PersonID' is remaining blank. The source part that we are using for the configurator has a planner set in this field, but the resultant part created through the configurator has a blank Planner value.
> >
> > any help would be appreciated.
> >
> > def var vQuoteNum as integer no-undo.
> > def var vQuoteLine as integer no-undo.
> > def var vCompany as character no-undo.
> > vQuoteNum = GetCurrentQuoteNum().
> > vQuoteLine = GetCurrentQuoteLine().
> > vCompany = GetCurrentCompany().
> > If vQuoteNum > 0 and vQuoteLine > 0 then do:
> > Find First QuoteDtl where QuoteDtl.Company = vCompany and Quotedtl.QuoteNum = vQuoteNum and Quotedtl.QuoteLine = vQuoteLine no-lock no-error.
> > If available QuoteDtl then do:
> > Find First PartPlant where PartPlant.Company = vCompany and PartPlant.PartNum = Quotedtl.PartNum no-lock no-error.
> > If available PartPlant then do:
> > run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'NonStock',"No").
> > run lib\UpdateTableBuffer.p(input BUFFER PartPlant:HANDLE,'PersonID',"MStock").
> > End. /* available PartPlant */
> > End. /* available OrderDtl */
> > End. /* OrderNum > 0 and OrderLine > 0 */
> >
> > any help would be appreciated
> >
> > erwin w
> >
>