child records changing an open parent record.

This question is not answered

Hi there,

I have properties (we're a housing association) which have assets such as sinks, air coniditioning etc.  The assets have a category one of which is called "Tenant Responsibility."  I created a workflow on the assets which sets a field on the property record (which is the parent record) to yes if the category of the asset is equal to tenant responsibility.

While this workflow works properly, it has a glitch.  The parent record is not refreshed after the field is set so if the property originally had the flag set to NO and then a workflow from a child record changes it, if the person entering the child records from the details bar on the left then goes back and presses "save" - it retains the original information and saves it.

Is there a way I can do this so it refreshes the parent informaiton?  Or could I do it using javascript?

All help appreciated.

JJ

All Replies
  • Hi JJ,

    CRM is not going to change that field when the user clicks Save unless the user updates the field while the record is open.  Can you confirm that this is not happening?   So

    1) User opens the Property record

    2) User adds an Asset on the left navigation

    3) Workflow runs and sets Tenant Responsibility to Yes

    4) User saves the Property record

    Tentant Responsiblity should say Yes, UNLESS

    A) The workflow hasn't finished running yet

    B) The user updated the Tenant responsiblity to No

    There is no way good and clean way to update the field while the user is looking at it on the screen, so I think workflow is the best way to go.

    Gretchen Opferkew
    PowerObjects, Director of Education

    Increase your CRM skills.  Find out about upcoming CRM Events.

  • Hi Gretchen,

    Thanks for answering - sorry for the delay in response on my end as my daughter has been ill.

    I’ve done a bit more investigating on my end.  Here are two scenarios:

    Scenario 1 – Property has tenant responsibility set to NO and has no property assets

    All  we are doing is opening the property record, adding an asset and then saving the property record and closing it.  No other fields are altered.  

    1) User opens a property record. User checks  to see that the tenant responsibility indicator is set to NO which it is.

    2) User adds an Asset on the left navigation and saves it.

    3) Workflow runs and presumably sets Tenant Responsibility to Yes.  Re-open the asset to see if the workflow completes successfully which it has done.

    4) Go back to the Property record, and look at tenant responsibility.  It is still set to No and we have not changed any other fields.

    5) Save the property record – it will still not update the field – on the screen

    6) close the property record and re-open it – the tenant responsibility flag is set to yes – this is a correct result.

    Scenario 2 – Property has tenant responsibility not set at all and has no property assets.  This is the more common scenario as this is a new field brought in late in the game.

    Again, all we are doing is opening the property record, adding an asset and then saving the property record and closing it.  No other fields are altered.  

    1) User opens a property record. User checks  to see that the tenant responsibility indicator is set to NO which it is.

    2) User adds an Asset on the left navigation and saves it.

    3) Workflow runs and presumably sets Tenant Responsibility to Yes.  Re-open the asset to see if the workflow completes successfully which it has done.

    4) Go back to the Property record, and look at tenant responsibility.  It has set itself to No which is the top selection on the picklist.  If I had set the top selection on the picklist to Yes – it would be set to yes.

    5)  Save the property record – it will still not update the field – on the screen.

    6) Close the property record and re-open it – the tenant responsibility flag will be set to No – or whatever the top selection in the Yes/No picklist was which isn’t what we want to happen.

    So I think I may have solved my own problem.  I think it can update a parent as long as the original picklist is set to a specific value – as opposed to being unset.  So I think my solution should be to update all properties and set the tenant responsibility to No and then my workflow will work properly!   Is there anything in your experience that would contradict that?

    It would be nice if the screen would update the value immediately but I agree with you that I don’t think there is a way to refresh the property record while you are looking at it.

    Cheers and thanks!

    JJK

  • Hi JJK,

    Saving a record doesn't refresh all the fields.  What it does is it updates the database with any changes that you made on the screen.  It keeps track of which fields are "dirty" (have been modified), and refreshes those fields.  

    So, when you have the property record open, and the workflow is updating the field in the background, and you are clicking save, the reason it is not showing you that the responsibility field now contains Yes is because that field is not "dirty".  You could put a little bit of javascript in there to mark that field as dirty and force it to refresh that field on save, if you really wanted to.

    This behavior of marking the field as "dirty" might be different when you have a default value versus if the field is blank, which sounds like that is what you are encountering.  

    Hope this helps!  Good luck!

    Gretchen Opferkew
    PowerObjects, Director of Education

    Increase your CRM skills.  Find out about upcoming CRM Events.

  • Hi Gretchen,

    I'm also experiencing this issue with CRM 4.0 since installing roll up 21 on our production server. (We went from 15 to 21).

    This isn't specific to a custom entity but seems to be a common problem with the picklist control.

    To recreate it,

    1)  Set up a picklist to a have default value to anything other than unassigned,

    2) Open a record instance of the entity with the field on that existed prior to the field being added, so this field is empty/unassigned

    3) Open a child record associated with this record, modify it.

    4) The parent record will no longer have a blank field, it will be set to the first item of that list with blank/unassigned no longer available for selection.

    It looks like there is a partial post back refresh call made to the parent window. I've tried this on multiple custom picklists all with the same result

    My users are using IE 9, but i've also replicated this on IE 8.

    Kind Regards,

    Jonny

  • Hi there!

    Interesting--this sounds like it might be a bug?  Have you considered opening a ticket with Microsoft on this?

    Gretchen Opferkew
    PowerObjects, Director of Education

    Increase your CRM skills.  Find out about upcoming CRM Events.