• Harshada Kadu 9
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 7
    Replies
Hi,

I have integrated Unleashed with salesforce.
Also imported products and customers into Unleashed.
But while syncing the opportunity with unleashed, it is giving me error "
There was an error retrieving the Customer related to this Opportunity."
Please advise on the above issue.
Thanks
Hi all, 
Can someone tell me if its possible to for Community moderators/managers to message community members, without allowing community members to message each other.
What is possible for allowing messaging? Chatter on the profile on the community member perhaps?

Thanks & Regards,
Harshada
Hi,
I have Acount as master and Invoice Details as child. Using Rest api data is being pushed into salesforce.Now when data for invoice details is being pushed, the error : " Unable to create/update fields: Party_ID__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set. "  is thrown. Party_ID__c is refernce for Account ID.

INVOICE_DETAILS__c {"Name":8953,"Trans_Type__c":"MSI","Trans_Date__c":"2016-06-10T00:00:00","Party_ID__c":"0012800001H7PeiAAF","Doc_No__c":"MO-1606-00152","Total_Amount__c":25531.55,"Transaction_SubType__c":"MEMO ISSUE"} Unable to create/update fields: Party_ID__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set.

I have checked all the settings for fields all seems fine.Please advice on what is going wrong

Thanks,
Harshada
 
Hello,
I have custom object Questions__c and Questionoption__c. they have master detail relationship. each question will have 6 options.
Now I want to display question and its options with radio buttons.
i am able to display it in visualforce page.
There are 4 questions with 6 options each.
so for each option selected a record should be created.
The selected value and its question I want to store in custom object.
I am unable to get selected value and its question from vf to apex class.

Following is my code:
VisualForce page:-
<apex:page id="thePage" showHeader="false" docType="HTML-5.0"  sidebar="false"
          standardController="Case" extensions="SurveyController_ex" standardStylesheets="false">   
      <apex:form >
    <html>
       
           
<div style="text-align: center; width: auto; margin: auto; background-color:#313131;padding-top:0.6%;padding-bottom:0.6%;">
<table style="text-align: center; margin: auto; width: 99%;" border="0" cellspacing="0" cellpadding="0" bgcolor="#151515">
<tbody>
<tr>
<td align="center" style="padding-top:0.3%"><img src="{!image}" alt="" height="45" border="0" /></td>
</tr>
<tr>
<td style="font-family: Arial,Helvetica,sans-serif; font-size: 12px; text-align: left;" bgcolor="#FFFFFF">
<div>
<div style="border-bottom: solid 1px #ddd; margin: 0px 5px 10px 5px;">&nbsp;</div>
<div id="reply" style="margin-left: 10px;">
      <br/>
    
     
         
       
          
         <!---input type="radio" name="option" checked="" value="{!op.Option__c}"/>
         <apex:outputPanel>
         {!op.Option__c}
        </apex:outputPanel-->
            <!---apex:selectRadio>
             <apex:selectOption itemLabel="{!q.sop}" itemValue="{!q.sop}" itemDisabled="false" value="{!q.sop}">
                </apex:selectOption>
             </apex:selectRadio--->
    
    
    <apex:repeat value="{!QU}" var="q" id="questionContainer">
        
       <apex:outputPanel >
             <div >
                 <apex:outputText>{!q.Question__c}</apex:outputText>
          </div>    
          
           <apex:selectRadio layout="lineDirection" value="{!getselectedvalue}">
                   <apex:selectOptions value="{!seloption[q.Id]}">
                     
                  </apex:selectOptions>
           </apex:selectRadio>
           
      </apex:outputPanel>
    </apex:repeat>
    
</div>
<div style="border-bottom: solid 1px #ddd; margin: 0px 5px 10px 5px;">&nbsp;</div>
    <apex:commandButton title="Submit" value="Submit" action="{!Submit}" />
<div style="color: #777; font-size: 10px; margin: 0px 0px 0px 10px;"><span style="background-color: #d8f4fa;"></span></div>
<div style="border-bottom: solid 1px #ddd; margin: -1px 5px 10px 5px;">&nbsp;</div>
</div>
</td>
</tr>
<tr style="font-family: Arial,Helvetica,sans-serif; font-size: 9px; text-align: center; color: #ffffff;" height="20">
<td style="padding-top:4px;padding-bottom:2px;"><apex:outputLabel value="{!footer}"></apex:outputLabel> &copy;<apex:outputText value="{!Case.CurrentYear__c}"></apex:outputText></td>
</tr>
</tbody>
</table>
</div>
    </html>
    </apex:form>
</apex:page>
-------------------------------------------------------------------------------------------------------------------------------------------------------------
SurveyController(paex Class)

 public String Footer{get;private set;}
    Case c;
    List<QuestionOption__c> quesoption{get;private set;}    
    public List<Questions__c> questionlist {get;set;}
    public List<QuestionOption__c> quesoplist {get;set;}
    public Map<Id, List<QuestionOption__c>> quesidlistmap { get; set; }
    public List<QuestionWrapper> queswrapperlist {get;set;}
    Set<Id> qId = new Set<Id>();
    Map<Id,Questions__c> qmap = new Map<Id,Questions__c>();
    public List<SelectOption> seloptionlist {get;set;}
    public Map<Id,List<SelectOption>> seloption {get;set;}
     public List<Questions__c> quenop{get;set;}//testing
    
    public List<String> getselectedvalue{get;set;}
    public List<String> getquestion{get;set;}
       
    public SurveyController_ex(ApexPages.StandardController controller){
        Footer = '';
        
        
    }
    
    public String getImage()
    {
        String Brand='NetBet.com';
        String Logo;
        
        if(Brand=='NetBet.com')
        {
            Logo='https://img.netbet.co.uk/poker/marketing_images/NetBet_logo.png';
            Footer='NetBet';
        }
        
        else if(Brand=='NetBet.it')
        {
            Logo='https://img.netbet.co.uk/poker/marketing_images/NetBet_logo.png';
        }
        else if(Brand=='NetBet.fr')
        {
            Logo='https://img.netbet.co.uk/poker/marketing_images/NetBet_logo.png';
        }
        else if(Brand=='777.be')
        {
            Logo='https://css.casino777.be/desktop/Themes/casino777v5/images/layout/logos/navi_logo_4.png';
        }
        else if(Brand=='Betfirst.be')
        {
            Logo='https://bfscripts.dhnet.be/themes/sbtech/images/logo_full_en.png';
        }
        else if(Brand=='Casino777.es')
        {
            Logo='https://www.casino777.es/themes/casino770/css/img/fd_logo.png';
        }
        return Logo;
        
    }
    
    public class QuestionWrapper{
        public  Questions__c question {get; set;}
        public List<QuestionOption__c> optionlist {get;set;}
        //  public List<SelectOption> sop {get;set;}
        public QuestionWrapper(Questions__c question,List<QuestionOption__c> optionlist){
            this.question = question;
            this.optionlist = optionlist;
            //  this.sop = sop;
            //[select Id,Option__c,QuestionId__c ,Name FROM QuestionOption__c where QuestionId__c = :q.Id];
            
        }
    }
    
 
       
    
    public List<QuestionWrapper> getList()
    {
        questionlist = [SELECT Id, Name, Question__c, Language__c FROM Questions__c];
        quesidlistmap = new Map<Id, List<QuestionOption__c>> ();
        queswrapperlist = new List<QuestionWrapper>();
        
        
        for(Questions__c ques :questionlist ){
            qId.add(ques.Id);
            qmap.put(ques.Id,ques);
            
        }
        quesoplist = [SELECT Id,Option__c,Name,QuestionId__c FROM QuestionOption__c where QuestionId__c =:qid order by Name];
        
        //   for(Questions__c ques :questionlist ){
        
        for(QuestionOption__c oplist : quesoplist){
            if(!quesidlistmap.containsKey(oplist.QuestionId__c)){
                quesidlistmap.put(oplist.QuestionId__c, new List<QuestionOption__c>());
            }
            // newoption.add(new SelectOption(oplist.Id,oplist.Option__c));
            quesidlistmap.get(oplist.QuestionId__c).add(oplist);
        }
        //  seloption.put(ques.Id,newoption );
        //   }
        for(Id opid : quesidlistmap.keySet()){
            queswrapperlist.add(new QuestionWrapper(qmap.get(opid),quesidlistmap.get(opid)));
        }
    
        
        return queswrapperlist;
        
    }
 
    public list<Questions__c> getQU(){
        
        quenop = [SELECT Id, Name, Question__c, Language__c,(SELECT Id,Option__c,Name,QuestionId__c FROM QuestionOptions__r order by Name) FROM Questions__c order by Name];
        seloption = new Map<Id,List<SelectOption>>();
        for(Questions__c q : quenop){
            List<SelectOption> l = new List<SelectOption>();
            for(QuestionOption__c qops : q.QuestionOptions__r){
                 l.add(new SelectOption(string.valueof(qops.id), qops.Option__c));
                seloption.put(q.Id,l );
                System.debug('list of options'+ l);
                System.debug('map of options'+ seloption);
               

            }
            
        }
      
        System.debug('quenop: ' +quenop);
        return quenop;

        
    }
    public PageReference Submit(){
       
        List<Response__c> resplist = new List<Response__c>();
        for(String s : getselectedvalue){
             System.debug('getselectedvalue :'+ getselectedvalue);
            Response__c resp = new Response__c();
            
            resp.OptionId__c = s;
            resplist.add(resp);
             System.debug('Response :'+ resp);
            System.debug('Response list :'+ resplist);
        }
        insert resplist;
      //  resp.OptionId__c = getselectedvalue;
       // resp.QuestionId__c =getquestion;
        // insert resp;
       
       
        return null;
    }

Thanks & Regards,
Harshada
Hello,
I am implementing Email to case.I want to set default email templates depending on case status, from email address and case owner when an agent tries to send an email.
I have written a class which implements Support.EmailTemplateSelector. I have referred to this link :-https://www.salesforce.com/blog/2012/10/case-feeds-smart-template-sample-implementation.html. But the template is not getting populated in email body.
So if anyone can help as to how to develop code that gives me functionality that I want.

Also there I have  teams of different languages.So I have different email messages in each language.But there are some values in them which should dynamically populate when agent tries to send email. I tried storing these messages in an object and using merge fields tried to retrive them in email templates.But the values are not getting fetched and when the email is sent, It appears to be blank.
What can I do to get these messages dynamically.?

Thanks & Regards,
Harshada
 
Hi,
I have integrated Salesforce with a site named SEA.
The data form SEA is pushed in Salesforce. However there are duplicate records which got inserted due to some password issue.
Now I want to remove the duplicate data i.e  duplicate accounts and also to make sure this not happens again I woud like to write a trigger on Account object.
If anyone could help me in removing the duplicates and in writting the trigger.

Regards,
Harshada
Hi , 
I have integration in salesforce with a site named SEA.
For some of the records , Ids in sandbox arenot  same as that in production. Hence, when  i try to change standard field "owner (Lookup to User Object)"  and a custom field "owner1__c (Lookup to User Object) " in account object an error is thrown  saying :--
Account {"Party_Sea_ID__c":8590,"Customer_Number__c":"C3235","Name":"Testing Sales Force ","DBA_Name__c":"Testing Sales Force ","OwnerId":"00528000005HQRPAA4","owner1__c":"00528000005HQRUAA4","Default_Currency__c":"US DOLLARS","Industry":"Jewelry","Business_Type__c":"JEWELLERY","No_of_Doors__c":4,"NumberOfEmployees":6,"Store_Size__c":6543,"Contact_Person__c":"Oliver","Rolex_Dealer__c":"Yes","Status__c":0,"Territory__c":"NYC","Sales_Code__c":"ASSET AND MEMO","RecordTypeId":"01228000000QbiM","Asset_Credit_Limit__c":0,"Memo_Credit_Limit__c":0,"Outstanding_A_R_Balance__c":0,"Outstanding_Memo_Balance__c":0,"BillingStreet":"101 Beckhem Drive,Lane Street,NEW YORK - 12345 , NEW YORK , USA","BillingCity":"NEW YORK","BillingState":"NEW YORK","BillingCountry":"USA","BillingPostalCode":"12345","Phone":"1234567890","Email__c":"Noemail@email.com"} insufficient access rights on cross-reference id: 00528000005HQ

This  error occurs due to the mismatched IDs. So I want to ask is there any way to change Ids in sandbox and make them equal to Ids in Production?

Regards,
Harshada Kadu
Hi ,
I have integration from a site named SEA to salesforce.
I have used account object to create accounts of customer. There are fields which get updated from sea to salesforce.
In Account object, there are two fields which have lookup given to user. The fields are owner(standard field) and owner1__c(custom field).
Now when account gets created in Sea the data gets pushed in salesforce properly. The problem arises when owner or owner1__c are changed in Sea. These changes don't reflect in Salesforce. Instead error arises  saying :-

Account {"Party_Sea_ID__c":8590,"Customer_Number__c":"C3235","Name":"Testing Sales Force ","DBA_Name__c":"Testing Sales Force ","OwnerId":"00528000005HQRPAA4","owner1__c":"00528000005HQRUAA4","Default_Currency__c":"US DOLLARS","Industry":"Jewelry","Business_Type__c":"JEWELLERY","No_of_Doors__c":4,"NumberOfEmployees":6,"Store_Size__c":6543,"Contact_Person__c":"Oliver","Rolex_Dealer__c":"Yes","Status__c":0,"Territory__c":"NYC","Sales_Code__c":"ASSET AND MEMO","RecordTypeId":"01228000000QbiM","Asset_Credit_Limit__c":0,"Memo_Credit_Limit__c":0,"Outstanding_A_R_Balance__c":0,"Outstanding_Memo_Balance__c":0,"BillingStreet":"101 Beckhem Drive,Lane Street,NEW YORK - 12345 , NEW YORK , USA","BillingCity":"NEW YORK","BillingState":"NEW YORK","BillingCountry":"USA","BillingPostalCode":"12345","Phone":"1234567890","Email__c":"Noemail@email.com"} insufficient access rights on cross-reference id: 00528000005HQ
-----------------------------------------------------------------------------------------------------
I have written two triggers: 

trigger Account_Share on Account (after insert,after update) {

 List<AccountShare> jobShares = new List<AccountShare>();
    
 for(Account a : trigger.new){

 if(a.owner1__c != null) {

   AccountShare accountRecord = new AccountShare();
   accountRecord.AccountId= a.Id;
   System.Debug('************* Salesforce Account ID ******* '+a.Id);
   
   accountRecord.UserOrGroupId = a.owner1__c;
   System.Debug('************* Salesforce Custom Owner: Account Executive ******* '+ a.owner1__c);
    
  
   accountRecord.AccountAccessLevel= 'edit';
   System.debug('Account Acess: '+  accountRecord.AccountAccessLevel);
   
   accountRecord.OpportunityAccessLevel='Read';
   System.debug('Opportunity Acess: '+  accountRecord.OpportunityAccessLevel);
   
   System.debug('Acc_share_trigger Account Record: '+ accountRecord);
    
   jobShares.add(accountRecord);
   }  

 /** Insert all of the newly created Share records and capture save result **/
 Database.SaveResult[] jobShareInsertResult = Database.insert(jobShares,false);
 System.debug('Insert all of the newly created Share records: '+ jobShareInsertResult);
}
}
----------------------------------------------------------------------------------------------------------------------

trigger Delete_Share on Account (after update) {
    
      // get the id for the group for everyone in the org
  ID groupId = [select id from Group where Type = 'Organization'].id;
  System.debug('Group ID:'+groupId);

    if(Trigger.isUpdate) {

    List<AccountShare> sharesToCreate = new List<AccountShare>();
    List<ID> shareIdsToDelete = new List<ID>();
    
    for (Account acc : Trigger.new) {
        shareIdsToDelete.add(acc.id);
        System.debug('Delete Account Share ID:'+acc.id);

      }
       
    // do the DML to delete shares
        if (!shareIdsToDelete.isEmpty())
         delete [select id from AccountShare where AccountId IN :shareIdsToDelete and RowCause = 'Manual'];
        System.debug('Deleted successfully..');

    /*// do the DML to create shares
    if(!sharesToCreate.isEmpty())
    insert sharesToCreate;
    System.debug('Create Share:'+sharesToCreate);*/
    }

}

----------------------------------------------------------------------------------------------
What to change in triggers to get fields updated in salesforce.?

Regards,
Harshada Kadu
 
Hi,
I have 2 triggers written named Account_Share and Delete_Share.
I am pushing data from external site into salesforce.
So,in Salesforce in Account object,one standard field named ownerID(Lookup User )  and one custom field named owner1__c (Lookup User ) should get updated whenever changes are done in the site.
But this is not happening.Even though changes are made in the site,same is not getting updated in salesforce, rather it  throws an error as follows:

Account {"Party_Sea_ID__c":3618,"Customer_Number__c":"C0354","Name":"LUXURY BRAND HOLDINGS INC.","DBA_Name__c":"LUXURY BRAND HOLDINGS","Customer_Group_Id__c":"a0028000015lr6gAAA","OwnerId":"00528000005HQRPAA4","owner1__c":"00528000005HQRPAA4","Terms_Id__c":"a042800000oV27IAAS","Default_Currency__c":"US DOLLARS","Industry":"Jewelry","Website":"www.luxurybrandholdings.com<http://www.luxurybrandholdings.com><http://www.luxurybrandholdings.com>","No_of_Doors__c":14,"NumberOfEmployees":0,"Store_Size__c":0,"Contact_Person__c":"0","Rolex_Dealer__c":"Y","Status__c":1,"Sales_Code__c":"ASSET AND MEMO","RecordTypeId":"01228000000QbiR","Asset_Credit_Limit__c":1000000.0,"Memo_Credit_Limit__c":1500000.0,"Outstanding_A_R_Balance__c":0.0,"Outstanding_Memo_Balance__c":0.0,"BillingStreet":"9 ROSS SIMONS DRIVE - 2920 , , ","BillingPostalCode":"2920"} Delete_Share: execution of BeforeUpdate caused by: System.DmlException: Delete failed. First exception on row 0 with id 00r28000020W8ELAA0; first error: DELETE_FAILED, cannot delete owner or rule share rows, id=00r28000020W8EL: [] Trigger.Delete_Share: line 89, column 1

-----------------------------------------------------------------------------------------------
Account_Share Trigger:
trigger Account_Share on Account (after insert,after update) {

 List<AccountShare> jobShares = new List<AccountShare>();
    
 for(Account a : trigger.new){

if (a.owner1__c != null) {
 
   

   AccountShare accountRecord = new AccountShare();
   accountRecord.AccountId= a.Id;
    
   
   System.Debug('************* Salesforce Account ID ******* '+a.Id);
   accountRecord.UserOrGroupId = a.owner1__c;
   System.Debug('************* Salesforce Custom Owner: Account Executive ******* '+ a.owner1__c);
    
  
   accountRecord.AccountAccessLevel= 'edit';
   System.debug('Account Acess: '+  accountRecord.AccountAccessLevel);
   
   accountRecord.OpportunityAccessLevel='Read';
   System.debug('Oppurtunity Acess: '+  accountRecord.OpportunityAccessLevel);
   
   System.debug('Acc_share_trigger Account Record: '+ accountRecord);
    
   jobShares.add(accountRecord);
 }  

 /** Insert all of the newly created Share records and capture save result **/
 Database.SaveResult[] jobShareInsertResult = Database.insert(jobShares,false);
 System.debug('Insert all of the newly created Share records: '+ jobShareInsertResult);


}
}
-------------------------------------------------------------------------------------------
Delete Share Trigger 
trigger Delete_Share on Account (before update) {


set<Id> AccountIDs = new Set<Id>();
for(Account a: trigger.new){
AccountIDs.add(a.id);
}
List<AccountShare> jobShares = new List<AccountShare>();

map<String,AccountShare> accountShareMap = new Map<String,AccountShare>();

for(AccountShare accShare : [select AccountId, UserOrGroupId from AccountShare where AccountId in :AccountIds])
{
 accountShareMap.put(String.valueOf(accShare.UserOrGroupId),accShare);

}



for(Account a : trigger.new){
Account oldAccount = Trigger.OldMap.get(a.id);
if ((a.owner1__c != oldAccount.owner1__c) && (a.ownerId != oldAccount.owner1__c)){
 
   AccountShare accountRecord = accountShareMap.get(string.valueOf(oldAccount.owner1__c)); 
    if (accountRecord  != null)
    jobShares.add(accountRecord);
  }
 }

if(jobShares.isEmpty() == false ){

 delete jobShares;
 }
 }


 
<apex:page standardController="Event_Detail__c" extensions="addProduct">
<script type="text/javascript">     
     function selectAllCheckboxes(obj,receivedInputID){
                var inputCheckBox = document.getElementsByTagName("input");
                for(var i=0; i<inputCheckBox.length; i++){
                    if(inputCheckBox[i].id.indexOf(receivedInputID)!=-1){
                        inputCheckBox[i].checked = obj.checked;
                    }
                }
     }    
    
    
</script>

  <apex:pageMessages />
  <apex:form >
      <apex:pageBlock >
           <apex:pageBlockButtons >      
           <apex:commandButton value="Save & New" action="{!saveAndNew}"/>          
                <apex:commandButton value="Done" action="{!save}" />
                <apex:commandButton value="Cancel" action="{!back}" />           
           </apex:pageBlockButtons>
           
         <apex:pageBlockSection >
           <apex:pageBlockSectionItem >Person Name:
                 <apex:inputField value="{!e.Person_Name__c}"/></apex:pageBlockSectionItem>
           </apex:pageBlockSection>
           
           <apex:pageBlockSection title="All Products" columns="1">    
                <apex:pageBlockTable value="{!wrappers}" var="c">
                        <apex:column >
                            <apex:facet name="header">
                                <apex:inputCheckbox onclick="selectAllCheckboxes(this,'inputId')"/>
                            </apex:facet>
                            <apex:inputCheckbox value="{!c.checked}" id="inputId"/>                   
                        </apex:column>
                        <apex:column value="{!c.transferProduct.Product_Name__c}" headerValue="Product Name"/>  
                        <apex:column headerValue="Unit Price">
                            <apex:outputText value="{!c.transferProduct.Unit_Price__c}" />
                        </apex:column> 
                        <apex:column headerValue="Quantity" >
                              <apex:inputField value="{!c.event.Quantity__c}" />
                        </apex:column>                                                               
                </apex:pageBlockTable>
            </apex:pageBlockSection>
         </apex:pageBlock>
  </apex:form>    

</apex:page>
Hi,
I have Acount as master and Invoice Details as child. Using Rest api data is being pushed into salesforce.Now when data for invoice details is being pushed, the error : " Unable to create/update fields: Party_ID__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set. "  is thrown. Party_ID__c is refernce for Account ID.

INVOICE_DETAILS__c {"Name":8953,"Trans_Type__c":"MSI","Trans_Date__c":"2016-06-10T00:00:00","Party_ID__c":"0012800001H7PeiAAF","Doc_No__c":"MO-1606-00152","Total_Amount__c":25531.55,"Transaction_SubType__c":"MEMO ISSUE"} Unable to create/update fields: Party_ID__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set.

I have checked all the settings for fields all seems fine.Please advice on what is going wrong

Thanks,
Harshada
 
Hi,
I have Acount as master and Invoice Details as child. Using Rest api data is being pushed into salesforce.Now when data for invoice details is being pushed, the error : " Unable to create/update fields: Party_ID__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set. "  is thrown. Party_ID__c is refernce for Account ID.

INVOICE_DETAILS__c {"Name":8953,"Trans_Type__c":"MSI","Trans_Date__c":"2016-06-10T00:00:00","Party_ID__c":"0012800001H7PeiAAF","Doc_No__c":"MO-1606-00152","Total_Amount__c":25531.55,"Transaction_SubType__c":"MEMO ISSUE"} Unable to create/update fields: Party_ID__c. Please check the security settings of this field and verify that it is read/write for your profile or permission set.

I have checked all the settings for fields all seems fine.Please advice on what is going wrong

Thanks,
Harshada
 
Hi , 
I have integration in salesforce with a site named SEA.
For some of the records , Ids in sandbox arenot  same as that in production. Hence, when  i try to change standard field "owner (Lookup to User Object)"  and a custom field "owner1__c (Lookup to User Object) " in account object an error is thrown  saying :--
Account {"Party_Sea_ID__c":8590,"Customer_Number__c":"C3235","Name":"Testing Sales Force ","DBA_Name__c":"Testing Sales Force ","OwnerId":"00528000005HQRPAA4","owner1__c":"00528000005HQRUAA4","Default_Currency__c":"US DOLLARS","Industry":"Jewelry","Business_Type__c":"JEWELLERY","No_of_Doors__c":4,"NumberOfEmployees":6,"Store_Size__c":6543,"Contact_Person__c":"Oliver","Rolex_Dealer__c":"Yes","Status__c":0,"Territory__c":"NYC","Sales_Code__c":"ASSET AND MEMO","RecordTypeId":"01228000000QbiM","Asset_Credit_Limit__c":0,"Memo_Credit_Limit__c":0,"Outstanding_A_R_Balance__c":0,"Outstanding_Memo_Balance__c":0,"BillingStreet":"101 Beckhem Drive,Lane Street,NEW YORK - 12345 , NEW YORK , USA","BillingCity":"NEW YORK","BillingState":"NEW YORK","BillingCountry":"USA","BillingPostalCode":"12345","Phone":"1234567890","Email__c":"Noemail@email.com"} insufficient access rights on cross-reference id: 00528000005HQ

This  error occurs due to the mismatched IDs. So I want to ask is there any way to change Ids in sandbox and make them equal to Ids in Production?

Regards,
Harshada Kadu
<apex:page standardController="Event_Detail__c" extensions="addProduct">
<script type="text/javascript">     
     function selectAllCheckboxes(obj,receivedInputID){
                var inputCheckBox = document.getElementsByTagName("input");
                for(var i=0; i<inputCheckBox.length; i++){
                    if(inputCheckBox[i].id.indexOf(receivedInputID)!=-1){
                        inputCheckBox[i].checked = obj.checked;
                    }
                }
     }    
    
    
</script>

  <apex:pageMessages />
  <apex:form >
      <apex:pageBlock >
           <apex:pageBlockButtons >      
           <apex:commandButton value="Save & New" action="{!saveAndNew}"/>          
                <apex:commandButton value="Done" action="{!save}" />
                <apex:commandButton value="Cancel" action="{!back}" />           
           </apex:pageBlockButtons>
           
         <apex:pageBlockSection >
           <apex:pageBlockSectionItem >Person Name:
                 <apex:inputField value="{!e.Person_Name__c}"/></apex:pageBlockSectionItem>
           </apex:pageBlockSection>
           
           <apex:pageBlockSection title="All Products" columns="1">    
                <apex:pageBlockTable value="{!wrappers}" var="c">
                        <apex:column >
                            <apex:facet name="header">
                                <apex:inputCheckbox onclick="selectAllCheckboxes(this,'inputId')"/>
                            </apex:facet>
                            <apex:inputCheckbox value="{!c.checked}" id="inputId"/>                   
                        </apex:column>
                        <apex:column value="{!c.transferProduct.Product_Name__c}" headerValue="Product Name"/>  
                        <apex:column headerValue="Unit Price">
                            <apex:outputText value="{!c.transferProduct.Unit_Price__c}" />
                        </apex:column> 
                        <apex:column headerValue="Quantity" >
                              <apex:inputField value="{!c.event.Quantity__c}" />
                        </apex:column>                                                               
                </apex:pageBlockTable>
            </apex:pageBlockSection>
         </apex:pageBlock>
  </apex:form>    

</apex:page>