16
Views
4
Comments
Solved
Issue on copying selected record

I have created checkbox on record for bulk copy function. However, I hv ecountered following issue on the copy logic, would plz help check with my code.

- First, I selected the highlighted record(Job ID 84 and 91) and click "Copy to next year", However, only JobID84 has been copied twice(second pic), and JobID 91 cannot be copied. 

- Second, all the assign widget inside my logic cannot be done. (Year End Date will add one more year after copied, etc)


- For your information, If I just click the single "Copy" for the record, it works, my logic is just adding "Is selected" on "Copy to next year", but can't figure where it goes wrong. Please help check my code (Mainflow\JobMaintenance2s). Thanks.!!


Test_20230918.oml
Solution

Hi,

I updated your logic and do refactor abit but haven't test it yet.

Hope you get the ideas.


Regards,

Khuong

Test_20230918.oml

@Khuong Truong 

I tested, but just found i have another problem in the result of copied tasks inside the job (Both single copy and copy to next year).

E.g. I click copy to this job, and there are 5 job tasks inside this job

- However, only one job task/2jobtasks (same) are created for the new record.

Kindly help review my copy task code. Thanks.

Hi @Winnie Lam ,

Code to clone looks fine . May be can you try to add this assignment in the Clone Task action and see if that works.

Hello @Winnie Lam 

It seems you put incorrect logic in Clone2 screen action, where you passed CurrentJobID as input parameter but its not required. 

Steps to make it correct -

1. In your Clone2 action don't pass any input param's.
2. First filter list GetJobMaintenance2s.List by IsSelected attribute.
3. loop on filtered list and pass current CurrentJobID value in CloneJobInfo action.

I hope it'll help you.

Thanks
Deep

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.