You need to sign in to do that
Don't have an account?
Kumar G
When i clicked on Submit button this will call one method called saveandsubmit , plz refer the method code in code sample.
Please help me to resolve this issue . Thanks in advance.
URL No Longer Exists Error while Clicking on Submit Button.
public void saveAndSubmit() { List<CaseComment> lstCmt = new List<CaseComment>(); CaseComment cmt = new CaseComment(); List<Technician_Appointment_Scheduler__c> lstTAS = new List<Technician_Appointment_Scheduler__c>(); Boolean success = false; String strOli=''; try{ if(lstSelectedProviProduct!=null && lstSelectedProviProduct.size()>0) { for(SelectionWrapper wrapper : lstSelectedProviProduct) { strOli += getSemiColonValid(wrapper.RecordId); system.debug('--->>>'+strOli); } } troubleTicket.Selected_Order_Line_Items__c=strOli; if(SelectedMultiSite == false){ troubleTicket.Service_Zip_Code__c = this.selectedAccount.Service_Location_Postal_Code__c; system.debug('===>>>Service_Zip_Code__c '+troubleTicket.Service_Zip_Code__c); } else{ for(Account acc: lstServiceAddress){ if(acc.id == SelectedServiceAddress){ troubleTicket.Service_Zip_Code__c = acc.Service_Location_Postal_Code__c; break; } } } List<Case> ttList = new List<Case>{troubleTicket}; List<Database.saveResult> srList = Database.insert(ttList); for (Integer i=0;i<srList.size();i++) { Database.SaveResult sr = srList.get(i); Case relatedCase = new Case(); if(sr.isSuccess()){ relatedCase = ttList.get(i); cmt = new CaseComment(); cmt.ParentId = relatedCase.id; cmt.CommentBody = relatedCase.Description; lstCmt.add(cmt); if(relatedCase.Status_Type__c=='Dispatched Out'){ tas.Trouble_Ticket__c = relatedCase.id; lstTAS.add(tas); } } } if(lstCmt.size()>0 && lstCmt!=null){ insert lstCmt; } if(lstTAS.size()>0 && lstTAS!=null){ insert lstTAS; } } catch(Exception e) { ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR,e.getMessage()); ApexPages.addMessage(msg); system.debug(e.getMessage()); } }
When i clicked on Submit button this will call one method called saveandsubmit , plz refer the method code in code sample.
Please help me to resolve this issue . Thanks in advance.
Please Use below link if you are using Inline VF page.Can you please post your VF page and Class.
http://help.salesforce.com/HTViewSolution?id=000230608&language=en_US
Thanks
Thanks for your reply.please find the VF Page code in code sample.
In the action function oncomplete you are calling another method.Can you provide the code for that method named 'submitTroubleTicket'.
Thanks
Can you change the submitTroubleTicket method with below code.
Let me know if you find any issue.
Thanks,
Swaraj
Hi Swaraj,
I checked with the below code Still "URL No Longer Exists Error" is coming , any other solution Plz share.