Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Looking for an idiots guide to deleting portal records. Have managed to add & edit but having problems with delete. I've read elsewhere that a button should be used with an associated "Delete portal Row[]" script however I'm having little success. Additionally when using CurrentRecID as a hidden field the parent record was being deleted so attempted to use CurrentPortalRowNumber but this gave me a 101 error.

Any help much appreciated.

Iain

Make sure you actually Go to portal row[] or a Delete Record/Request will delete the current record and its child records.

I usually find it best to Go to Related Record[show, ID] and run an external script to Delete Record/Request from the related file. Then I know there's no possible way my parent can accidentally be deleted. I would also deselect the 'Allow deletion of portal records' in the formatting for your portal so that no one can inadvertently trash related records.

It is on web smile.gif

Why not pick the record directly in portal db?

The only method that I've found is, as Anatoli said, by deleting the record directly from the related file. I've had to do this by creating a Calculated field which outputs the RecID of the related record.

It is a bit of a pain to have to do it this way. Wish there were a better way!

Good Luck.

Garry

  • 2 months later...

Garry,

Could you please explain your method in a little more detail with some sample code? I understand the concept, but am unsure how to implement it.

I'm starting to work with portals via CDML and was looking to be able to delete and/or edit certain rows of any portal. I already figured the adding a row part smile.gif

Any help with deleting and/or editing portal rows, is much appreciated. Thanks!

-Justin

I create a Calculated field in the related file which returns the RecID, e.g.???

Status(CurrentRecordID)

This field is placed in the Portal, of the parent, on the Layout used for the Web.

I then create a Form in my editing page which will be used for deleting related records (Portal Rows):

<form name="rmvrowfm" action='/FMPro' method='post' target='quote'>

<input type="hidden" name="-db" value="quote_line_items.fp5">

<input type="hidden" name="-lay" value="web">

<input type="hidden" name="-format" value="editreturn.html">

<input type="hidden" name="-recid" value="">

<input type="hidden" name="-delete">

</form>

Within the portal display (line-items) on the page I have a "Remove" link at the end of each row:

<a href="Javascript:rmvrow('[FMP-Field:quote_rel::rec_id]');">Remove</a>

This link calls a Javascript function declared in the <head> of the page:

function rmvrow(rmvrecid)

{

if (confirm("Remove Item?")) {

document.rmvrowfm.elements["-recid"].value = rmvrecid ;

document.rmvrowfm.submit() ; } ;

}

Hope this helps.

Garry

seems to make sense.....I'll give it a try

Thanks Garry!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.