function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DogmaDogma 

Problem mapping to read only fields with an S-Control

my issue is how do you map to fields that are read only. It doesn't work, well at least not for me. I have created an S-Control which is invoked by a hyper link which is on the Accounts Profile custom object page. In Turn when this is clicked it should create a new task and pre populate some of the fields.

Solutions that I have tried.

1) Mapping with original record type

1) Mapping with another record type and with a new page layout that it switchs to it when the user clicks onto the link. Obviously making the original page layout and FLS as "edit all" and the new record type to be restrictive.

Here is the code for the mapping with original record type

 

<script language="JavaScript">

var myDate=new Date();
var month = myDate.getMonth() +1;
var day = myDate.getDate();
var year = myDate.getFullYear();


function redirect() {
parent.frames.location.replace("/500/e?retURL=%2F{!Account.Id}&cas6=Client Set-Up&cas11=Client Set-Up&cas14=Client Set-Up&00N00000006qSf2={!Account_Profile__c.Company_Listed_on_Stock_Exchange__c}&cas3={!Account_Profile__c.Contact_Name__c}&00N00000006oqSt="+day + "/" + month+ "/" + year)
}
redirect();

</script>

Also, if I try to add another mapping after the last line of code "+ year)" It freaks out.

DogmaDogma
Ok, to cut a long story short I need to be able to change the recordtype after I save. Does Any body know how to do this with a url?
DogmaDogma
Ok, worked it out. Work flow for the final record type switch.:smileyvery-happy: