• Umair Khan 19
  • NEWBIE
  • 20 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
I have a Requirement of Grouping the data by distributor name and subgrouping by Created Date.
can anyone tell me how to achieve this.
User-added image
I created a custom button on the account detail page and when I click the button a new contact record is created using account data and the page is reloaded. I want to open the contact page after it is inserted,.

This is what i tried
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}

{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}
 

var con=new sforce.SObject("contact");
con.Lastname='{!Account.Name}';
con.accountId='{!Account.Id}';
result = sforce.connection.create([con]);
window.location.reload();


and this is for referring the page but is showing Undefined.
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}

{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}
 

var con=new sforce.SObject("contact");
con.Lastname='{!Account.Name}';
con.accountId='{!Account.Id}';
result = sforce.connection.create([con]);

window.location.assign("https://ap15.salesforce.com/"+con.id);


 
I have a Requirement of Grouping the data by distributor name and subgrouping by Created Date.
can anyone tell me how to achieve this.
User-added image
I created a custom button on the account detail page and when I click the button a new contact record is created using account data and the page is reloaded. I want to open the contact page after it is inserted,.

This is what i tried
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}

{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}
 

var con=new sforce.SObject("contact");
con.Lastname='{!Account.Name}';
con.accountId='{!Account.Id}';
result = sforce.connection.create([con]);
window.location.reload();


and this is for referring the page but is showing Undefined.
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}

{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}
 

var con=new sforce.SObject("contact");
con.Lastname='{!Account.Name}';
con.accountId='{!Account.Id}';
result = sforce.connection.create([con]);

window.location.assign("https://ap15.salesforce.com/"+con.id);