• Tejender Mohan 15
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hello
How many Email Alerts and Tasks can be created on an Object? Is there any documentation that gives details about the limits of creating Metadata Components in salesforce?
Thanks

Can someone please post an example code to update assignment rules using Metadata API?

Hi Team,

I have a requirement to display more than 30 records in the List view for an application ireespective of the object.

but currently with the standard list view component we can achieve only upto 30 not more than that. Can you help me how can i do that wi th standard component.

If it is not possible with standard list component, what is the alternate.

Standard List view

 
I have been trying to update the Assignment Rule's Rule Entry assignTo field using UpdateMetadata Call. I have tried several ways but still not able to update it. Can someone please suggest any solution? Below is the code snippet :
MetadataService.IReadResult readResult = new MetadataService.ReadAssignmentRulesResult();

readResult = service.readMetadata('AssignmentRules', new String[]{'Lead'}); 

MetadataService.Metadata[] mdInfo = readResult.getRecords(); 

MetadataService.AssignmentRules TempAssignmentRules = (MetadataService.AssignmentRules) mdInfo[0];

 System.debug('Assignment Rule Name :---> '+ TempAssignmentRules.AssignmentRule[0].fullname); 

System.debug('Assigneee Name :---> '+TempAssignmentRules.AssignmentRule[0].ruleEntry[0].assignedTo);

 //Updating Value Here 
TempAssignmentRules.AssignmentRule[0].ruleEntry[0].assignedTo='teXYZ.com'; 
//Update 
MetadataService.SaveResult[] results = service.updateMetadata(new MetadataService.Metadata[] { TempAssignmentRules});
 System.debug('ERROR : '+ results[0].errors[0].message); //Error is "unexpected metadata".