Question

Generating Task Templates off Place ID

  • 5 February 2020
  • 9 replies
  • 175 views

Userlevel 5
Badge +13

Task templates let you add part needs based on model ID, part ID, product family & product name.

i am looking to add “place ID” as one of the parameters for the part needs so if its a specific model for a specific store, they get a different part need

 

any one had any luck with this?


9 replies

Userlevel 5
Badge +13

@Mike The FSM TechnoGeek  do you have any experience with this?

Userlevel 5
Badge +17

I don’t have experience trying to directly do what you are specifically trying to achieve, but what you could try is:

‘Paint’ a user_def from task_template_part_need on the listview in a custom version of the TASKTEMPLATE screen so you can set a particular value for the part_needs which should have their place_id changed.  Then use a custom business process on part_need to set the place/location to/from as per your business requirements in after_commit_insert of the part_need record with that particular value in the user_def field.

Does that make sense?

Userlevel 5
Badge +13

Hey @Mike The FSM TechnoGeek  - I’ve read your comment throughout this week and i dont think i full grasp it.

 

what i think you’re saying: to create a user_def under task_template_part_need. i dont understand even with the business rule, how that would work when the contract generates. My brain is running in circles on this

Userlevel 5
Badge +17

I think I need to know the whole process you’re trying to create.  It sounds like you are working with PM tasks generated for lines on a contract?  The PM tasks are using a task template which has part_needs defined.  Do you want a different template with different parts based on the place that has the contract PM coverage?  Is that what you’re needing?

Userlevel 5
Badge +13

I think I need to know the whole process you’re trying to create.  It sounds like you are working with PM tasks generated for lines on a contract?  The PM tasks are using a task template which has part_needs defined.  Do you want a different template with different parts based on the place that has the contract PM coverage?  Is that what you’re needing?

Hi @Mike The FSM TechnoGeek - yes that’s exactly it. They will be used from PM tasks on a contract. 
Here’s an example. 
all customers get a maintenance kit, lube and sanitizer. They get one of each. 
Some Customers want 2 of each. Some want 2 kits with 1 of the rest. They all want different variations. 
I can’t do different templates based on that because that would need mor contract types and we have 3,000 active customers. 
that’s why ideally, just like the way the task template can look at the product model, I want it to look at the place ID. I know in the product table there’s is a “place owned by” field and could possibly use that for reference. But I don’t know how I would link that I’m the part need templates. 
 

hope this extra information provides clairty

 

thanks again

 

Userlevel 5
Badge +17

What about the place_id, or place record would tell you what part_needs should go on the task?  Are you storing the kit preferences somewhere on the place records?

Userlevel 5
Badge +13

@Mike The FSM TechnoGeek the place ID itself would tell is.

in this example below. If the model ID is 0060 and it is owned by place ID 1234 then they get part # X34615

If they just have the model they get the rest

the kit preferences would all be in the template

 

 

Userlevel 5
Badge +17

Here is what I would try,

  1. In UI Designer, add a user_def from task_template_part_need to the TASKTEMPLATE screen in the Part Needs tab.  Label it ‘Place ID’.  I would use a message ID for the label so that it can be localized.  You may also want to add column lookup validation to the place table in step #2 below, but DO NOT make it a combobox if you do that.
  2. Create a custom column def in custom metadata for the user_def in step #1 and set force_select = ‘Y’.
  3. In custom metadata, set a relationship (this could be complex) to relate the user_def from step #1 to the place ID from the contract.. or the product?.  Perhaps something like part_need->task->contr_pm_schedule->contr_product→??product/contract
  4. Create a custom validation process on insert of part_need.  Interrogate the user_def from step #1, and compare it to the place_id on the related record from step #3, etc. or something like that, etc. (?).  Remember, you are creating a logical condition to PREVENT the insertion of the PM Task part_need record when the condition(s) logically resolve true.  You’ll need to look at things like whether or not the field is null etc.

This is purposefully rather general.  The details of your business rule criteria (step #4 above) are where this might be challenging.

Userlevel 5
Badge +13

Here is what I would try,

  1. In UI Designer, add a user_def from task_template_part_need to the TASKTEMPLATE screen in the Part Needs tab.  Label it ‘Place ID’.  I would use a message ID for the label so that it can be localized.  You may also want to add column lookup validation to the place table in step #2 below, but DO NOT make it a combobox if you do that.
  2. Create a custom column def in custom metadata for the user_def in step #1 and set force_select = ‘Y’.
  3. In custom metadata, set a relationship (this could be complex) to relate the user_def from step #1 to the place ID from the contract.. or the product?.  Perhaps something like part_need->task->contr_pm_schedule->contr_product→??product/contract
  4. Create a custom validation process on insert of part_need.  Interrogate the user_def from step #1, and compare it to the place_id on the related record from step #3, etc. or something like that, etc. (?).  Remember, you are creating a logical condition to PREVENT the insertion of the PM Task part_need record when the condition(s) logically resolve true.  You’ll need to look at things like whether or not the field is null etc.

This is purposefully rather general.  The details of your business rule criteria (step #4 above) are where this might be challenging.

Hi @Mike The FSM TechnoGeek  1 & 2, makes sense. 3 & 4 not so much. More so 4 than anything. 

Reply