Maint Form Undo Button


Author
Message
Larry Caylor
Larry Caylor
Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

On a SF Maint Form, does clicking the Undo button call the Maint form’s undo method or the primary business object’s undo method? I have a Maint form with two business objects that have a parent-child relationship. Undo is working on the parent but not the child and I believe it’s because the Undo button only calls the parent’s (primary object) undo method. If so I know how to get the behavior I want, I just want to make sure I understand what is going on.

-Larry

Gary C Wynne
Gary C Wynne
StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)
Group: Forum Members
Posts: 26, Visits: 236
Hi Larry

Take a look at the "IncludeInFormUndoType" property on the form. This can be combined with a counterpart property on the BO called "IncludeInFormUndo". Basically, you can have the "Undo" action applied to the PrimaryBO, AllBOs or determined by BOs that have their IncludeInFormUndo property set true.

This logic can be applied to all other "actions" like Save, Edit, Delete, New, Navigate etc.,

HTH

-=Gary

 

 


StrataFrame Team
S
StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)StrataFrame Developer (3.1K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Larry,



Once again, Gary is correct Smile



If your form doesn't have the IncludeInFormType options, you'll have to download the latest version.
Gary C Wynne
Gary C Wynne
StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)
Group: Forum Members
Posts: 26, Visits: 236
Hey Ben

The "states" enhancement sure is resolving quite a few issues Wink

What a great idea ! Cool

Larry Caylor
Larry Caylor
Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)Advanced StrataFrame User (736 reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K

Gary,

 

Thanks for the info. I was aware of the BO property “IncludeInFormUndo” but missed its counterpart  ‘IncludeInFormUndoType” at the form level. I gave this combination a try but it didn’t produce the exact result I was looking for. My child object is being displayed in a ListView on the maint form and is being refreshed in the ‘EditingStateChanged” event handler for the form. When I click Undo on the form the old values are not being reflected in the ListView and I’m assuming that is due to the order in which events are raised. “EditingStateChanged” is probably being raised before “Undo” on the child object.  I can get the desired result by calling Undo on the child object in the “BeforeUndo” event handler on the form or refreshing the ListView in the “EditingStateChaged” event handler of child object.

 

StrataFrame provides a lot of options and therefore presents a definite learning curve, but I’m finding the more I work with it the more I like it.

 

-Larry

Gary C Wynne
Gary C Wynne
StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)StrataFrame Beginner (26 reputation)
Group: Forum Members
Posts: 26, Visits: 236

Hi Larry,

 

>Thanks for the info.

 

No problem.

 

>I was aware of the BO property “IncludeInFormUndo” but missed its counterpart  ‘IncludeInFormUndoType” at the form level. I gave this combination a try but it didn’t produce the exact result I was looking for.

 

Well, it should allow the Undo to occur on the child BO. As to the list not reflecting the changes, it needs refreshing, as you have established.

 

>or refreshing the ListView in the “EditingStateChaged” event handler of child object.

 

I would have thought that the logical place to refresh the List is in the AfterUndo event handler (for either the BO in question or the form). Refreshing in the "EditingStateChanged" event will mean some kind of conditional testing to ensure that you only refresh the list when you can detect an Undo action has occured. If you use AfterUndo, particularly using a BO specific handler, you can safely Refresh the list and know that you are doing it at exactly the right time/place/right BO.

 

>StrataFrame provides a lot of options and therefore presents a definite learning curve,

 

There is a learning curve with most tools but its fun learning Smile

 

>but I’m finding the more I work with it the more I like it.

 

That's all that matters. I find SF intuitive and very productive.

 

HTH

 

Best

 

-=Gary


Michael R Poirier
Michael R Poirier
StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)StrataFrame Beginner (9 reputation)
Group: StrataFrame Users
Posts: 9, Visits: 131
I would like to put a check box on the SF browse dialogue to allow the filter of only records with a true or false in a bit type field.  Can't seem to make it work.
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.2K reputation)Strategic Support Team Member (2.2K reputation)Strategic Support Team Member (2.2K reputation)Strategic Support Team Member (2.2K reputation)Strategic Support Team Member (2.2K reputation)Strategic Support Team Member (2.2K reputation)Strategic Support Team Member (2.2K reputation)Strategic Support Team Member (2.2K reputation)Strategic Support Team Member (2.2K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Michael.

Choose the Combo-Enum tab in the Search Field Criteria dialog and set it to an enum that you will create with your False/True statements.
Edited 13 Years Ago by Ivan George Borges
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search