1

I am using EditRecord java script navigation method.But this is not working for me. I am getting error in Inspect elements. Illegal literal.

I used this way Function redirect(){ sforce.one.editrecord('{!id}');

I am getting error in while accessing Id in editrecord javascript in bulit function.

Please help me.

0
<script type="text/javascript">

        function doEditRecord(recordId) {

            if( (typeof sforce != 'undefined') && (sforce != null) ) {
                sforce.one.editRecord(recordId); 
            } else {
                window.location.href = '/' + recordId + '/e?retURL={!$Page.S1_EditRecord}';
            }

            return false;
        }
    </script>

<apex:commandbutton value="Save" action="{!saveRecord}" oncomplete="return backToRequest('{!currentRecordId}');" rendered="{!$User.UITheme == 'Theme4d'}" />

currentRecordId is passed from apex controller to visualforce page using get set method.

|improve this answer|||||

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.