+ Start a Discussion
SF DEVSF DEV 

Can we modify Apexexchange apps

Can we modify appexchange code as per our requirement after installing it. 

 

 

 

Madhan Raja MMadhan Raja M

We cannot modify the code if the installed Package (AppExchange Apps) Type is Managed.

 

 

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

 

Madhan Raja M

 

SFFSFF

But if it is unmanaged, you can modify the package contents ...

SF DEVSF DEV

Thanks for the info.

 

 

 

I just need to use the reply button code from salesforce twitter: below is the code

 

var id = null;
var url = window.location.href;
var status = '{!sf4twitter__Twitter_Conversation__c.sf4twitter__Status__c}';

if (status == 'Deleted') {
alert('{!$Label.sf4twitter__CONVERSATION_IS_DELETED_GENERIC}');
}
else {
// get the object id from the current url
var id_regex = /(\/|\?|&)id=([^&]*)/i;
var match_result = id_regex.exec(url);
if (match_result != null) {
id = match_result[2];
} else {
var std_url_regex = /salesforce\.com\/([^&\/=?]*)/i;
var std_url_match_result = std_url_regex.exec(url);
if (std_url_match_result != null) {
id = std_url_match_result[1];
}
}
var launchedFromHover = false;

if (id != null && id.indexOf('emptyHtmlDoc.html') >= 0) {

var recordIdContainer = document.getElementsByClassName('bRelatedList')[0];
id = recordIdContainer.id.split("_")[0];
launchedFromHover = true;
}
// go to the message form with the obtained id
if (id != null) {
var popupHeight = 450;
var popupWidth = 500;
var popupLeft = ( screen.width - popupWidth ) / 2;
var popupTop = ( screen.height - popupHeight ) / 2;

var popupSpecs =
'width='+ popupWidth + ',' +
'height=' + popupHeight + ',' +
'left=' + popupLeft + ',' +
'top=' + popupTop+ ',' +
'toolbar=no,' +
'titlebar=no,' +
'location=no,' +
'directories=no,' +
'status=no,' +
'menubar=no,' +
'scrollbars=yes,' +
'copyhistory=yes,' +
'resizable=yes';
if (launchedFromHover) {
window.open(
'/apex/sf4twitter__TwitterMessage?id=' + id + '&retURL='+encodeURIComponent(top.location),
'_blank',
popupSpecs);
} else {
window.open(
'/apex/sf4twitter__TwitterMessage?id=' + id + '&retURL='+encodeURIComponent(window.location),
'_blank',
popupSpecs);
}

}
}

 

 

the lines marked in red: are getting encoded....what has to be done???

 

Madhan Raja MMadhan Raja M

Is the App type is Managed or Unmanaged?

 

Madhan Raja M

SF DEVSF DEV

Its manged package. No scope to use the code, but is there any solution to add a new class which is custom, the same functionality.

Madhan Raja MMadhan Raja M

We can create a new class but this class cannot be called from the App.

 

Madhan Raja M

SF DEVSF DEV

Yes, your right. Tried but could not do that. 

 

Thanks.

 

Madhan Raja MMadhan Raja M

I had a same issue and then I created my own App.

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

 

Madhan Raja M

SF DEVSF DEV

You mean the salesforce twitter complete app!!!! u have done by your own.

 

I was just trying to approve the post after they try to reply to thr twitter post. it has to be approved and then posted.

 

 

Could this be done!!

Madhan Raja MMadhan Raja M

I had a same scenario where I wanted to add some extra code in the class that was available in the Manage app but could not able to do it, then I created my own app (Simple App and not Twitter App).

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

 

Madhan Raja M

 

SF DEVSF DEV

hoo, okay...