1

enter image description here

I want to check the record as shown in the next screen and move on to the checked record screen when I click the sync button.

But the screen doesn't go over and it keeps stagnating.

Here's is my Code

VisualPage code

<apex:page standardController="Proposal__c" recordSetVar="props" extensions="SyncProposal" action="{!syncProposeTest}" />

ApexClass

public class SyncProposal {
    public List<Proposal__c> selproLst;
    public String PropIds;

    public SyncProposal (Apexpages.StandardSetController cntlr) {
        selproLst = cntlr.getSelected();
        PropIds ='';
        for (Proposal__c pro : selproLst) {
            PropIds += pro.id + ',';
        }
        PropIds = PropIds.removeEnd(',');

    }

    public Pagereference syncProposeTest() {
        String returnURl = 'https://<mydomain>.com' + PropIds;
        Pagereference pg = new Pagereference (returnURl);
        pg.setRedirect (true);

        System.debug(selproLst);
        System.debug(PropIds);

        return pg;

    }
}

Thank you

1 Answer 1

0

Maybe I miss something, but the "PropIds" are not defined in method "public Pagereference syncProposeTest()"?

'https://.com' + PropIds;

Should be called as "public Pagereference syncProposeTest(String PropIds)".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.