• Fesal Suraitawala
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
I have created a custom button that redirects to new record creation form with selected recordtype.
 
/a28/e?CF00N0v000004Ku31={TestName}&CF00N0v000004Ku31_lkid={TestId}&retURL=%2F{!ContactId}&RecordType=0120v000000SCPO&ent=01I0v000000MTi6

But this is not working properly in the lightning environment, it's open new form in a popup but after cancel does not redirect to return URL.

Please tell me if you have a better solution.
I have created VF page that get data from report and bind in VF page.
There is also filter functionality implemented for this custom reoport.

Now I have requirement to add Report Filter Logic like we use in standard report filter i.e. (1 AND 2 AND (3 OR 4)).
But, I am not able to add it in Apex Class.
Reports.ReportDescribeResult describe = Reports.ReportManager.describeReport(REPORT_ID);
Reports.ReportMetadata reportMetadata = describe.getReportMetadata();
List<Reports.ReportFilter> lstFilters = new List<Reports.ReportFilter>();

if(String.isNotBlank(strSpread)) {
	String[] spaceSize = strSpread.split(' ');
	if(spaceSize[0].contains('-')) {
		lstFilters.addAll(addRangeFilter('Deal_Quotes__c.Spread__c',spaceSize[0].split('-')[0].trim(), spaceSize[0].split('-')[1].trim()));
	} else if(getEndRangeString(spaceSize[spaceSize.size()-1]) != '') {
		String strrange = getEndRangeString(spaceSize[spaceSize.size()-1]);
		lstFilters.addAll(addRangeFilter('Deal_Quotes__c.Spread__c',
										strrange == 'above' ? spaceSize[0].trim() : null,
										strrange == 'above' ? null : spaceSize[0].trim()));
	}
}
if(String.isNotBlank(dateRangeFrom)) {
	lstFilters.add(new Reports.ReportFilter('Deal_Quotes__c.Quote_Date__c', 'greaterOrEqual', dateRangeFrom));
}
if(String.isNotBlank(dateRangeTo)) {
	lstFilters.add(new Reports.ReportFilter('Deal_Quotes__c.Quote_Date__c', 'lessOrEqual', dateRangeTo));
}

if(lstFilters.size() > 0) {
	reportMetadata.setReportFilters(lstFilters);
}
return Reports.ReportManager.runReport(REPORT_ID, reportMetadata, true);

Above is my code. Please give me suggestion, where should I add the filter logic?
I have to display article in multi language in community and it's working if use article URL.
User-added image

but when try to show article topic wise, all articles appear who catagorised with selected topic type in english but not display in other langauge.
User-added imageUser-added image
I have translated all article in japanese, korean and chinese and also published all version of article.

Please tell me best way to display article topic wise.

Thanks.
I am trying to update businessprocess using metadata api. BusinessProcess updated successfully and also display in sales process UI. But I am not able to show updated picklist value in stage field on opportunity page.User-added image
User-added image

Code:
MetadataService.MetadataPort service = createService();

MetadataService.BusinessProcess fundRaiseBusinessProcess = (MetadataService.BusinessProcess) service.readMetadata('BusinessProcess', new String[] {'Opportunity.Fund Raising Process - Fund Raise'}).getRecords()[0];

MetadataService.PicklistValue newPicklistValue = new MetadataService.PicklistValue();

String[] fundRaisePicklistValue = new String[] { '1st Meeting', 'Closing', 'Documentation', 'Due Diligence', 'First Meeting', 'Funding', 'Initial Email', 'Investor',
                                                 'On-Hold', 'Pitchbook', 'Second Meeting', 'Signing', 'Subscription Doc', 'Termsheet /LOI', 'Termsheet Signed'};

for(String strPicklistValue: fundRaisePicklistValue) {
    
    newPicklistValue = new MetadataService.PicklistValue();
    newPicklistValue.fullName = strPicklistValue;
    newPicklistValue.default_x = false;
    
    fundRaiseBusinessProcess.values.add(newPicklistValue);
}
List<MetadataService.SaveResult> results = service.updateMetadata(new  MetadataService.Metadata[] { fundRaiseBusinessProcess });

Can any body know this what is issues.
I have created a custom button that redirects to new record creation form with selected recordtype.
 
/a28/e?CF00N0v000004Ku31={TestName}&CF00N0v000004Ku31_lkid={TestId}&retURL=%2F{!ContactId}&RecordType=0120v000000SCPO&ent=01I0v000000MTi6

But this is not working properly in the lightning environment, it's open new form in a popup but after cancel does not redirect to return URL.

Please tell me if you have a better solution.