Jump to content

Duplicating Portal Records


hairyjim
 Share

This topic is 7388 days old. Please don't post here. Open a new topic instead.

Recommended Posts

How do you duplicate a record and also the data in the portal?

I have two DB's, one called Quote Builder and another (which servers the portal) called Quote items.

How do I do this, I cannot figure out what script steps to use....

Link to comment
Share on other sites

It's not so much a what as a where. The "what" is just the script step Duplicate Record/Request. A script must be run in the Quote Items file to do this. You must also make sure that the script duplicates the index that connects the record in Quote Items to the correct record in Quote Builder. The script can be triggered by a button in the portal row, this will automatically select which portal row you wish to duplicate. The scripts might look like:

In Quote Builder:

Allow User About (off)

Set Error Capture (on)

Go to Related Record (Quote Items)

Go to field() <--- this or some step necessary to force return to Quote Builder

In Quote Items:

Allow User About (off)

Set Error Capture (on)

Duplicate Record/Request

Set Field(:, "") <--- clear any fields you want blank

-bd

Link to comment
Share on other sites

I think you may have misunderstood.

I want to duplicate the record, but every time I duplicate it the portal information is not duplicated!

How do I duplicate the whole record and all the information that is being displayed in the portal?

Thanks

James crazy.gif" border="0

Link to comment
Share on other sites

quote:

Originally posted by hairyjim:

How do I duplicate the whole record and all the information that is being displayed in the portal?

You need to duplicate both the parent record as well as all the child records in the related file. Remember that the information in the portal is not just part of the master record, they are all records on thier own.

They way I do it is to duplicate the master record, then goto the related records, duplicate them via a loop in a script. Finally I go though and update all of the various IDs so that they are correctly related.

This all needs to be controlled via scripting and not simply using the Duplicate command.

Link to comment
Share on other sites

Hi Guys,

Right I have used this code to duplicate portal records:

The first is in the main DB.

Enter Browse Mode []

Go to Layout ["Data Entry"]

Go to Related Record [show, "Quote Items"]

Duplicate Record/Request

Copy [select, "Quote Number']

Perform Script [sub-scripts, External: "Remote Quote Items"]

Go to Layout

And this is in the child DB.

Enter Browse Mode []

Go to Layout ["Data Entry"]

Sort [Restore, No dialog]

Go to Record/Request/Page [First]

Loop

Duplicate Record/Request

Paste [select, "Quote Number"]

Go to Record/Request/Page [Exit after last, Next]

End Loop

The problem is it is not correctly duplicating two fields. Quantity and Section Number. They are set to default values of 1. But a user can change the value from 1 to 2, or 3 etc. But obviously when it comes to duplicating the record it defaults the value back to 1.

Does anyone know a way around this. I need to keep the default value in, otherwise if a user 'adds' a new item to the invoice it will not include the price!

Please...please help. I am going in circles with this one and it is driving me back to smoking again.....

James crazy.gif" border="0

Link to comment
Share on other sites

This topic is 7388 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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