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
sasasasa 

Invalid Type $ObjectType after registering Namespace

Anyone here has registered Namespace already?

We just had our Namespace registered and our links are now broken. e.g

we were using this string
var returl = "{!URLFOR( $Action.CObject1__c.Next ,  $ObjectType.CObject1__c,null,true)}&rptid=" + result[0].id;

and after registering Namespace it automatically changes all my codes in SControl into this -->
var returl = "{!URLFOR( $Action.Namespace__CObject1__c.Next ,  $ObjectType.Namespace__CObject1__c,null,true)}&rptid=" + result[0].id;

and with error returned from browser as
uncaught exception: {faultcode:'sf:INVALID_TYPE', faultstring:'INVALID_TYPE: sObject type 'CObject1__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', detail:{InvalidSObjectFault:{exceptionCode:'INVALID_TYPE', exceptionMessage:'sObject type 'CObject1__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', row:'-1', column:'-1', }, }, }

our customer object clearly already have __c appended. and this code resides in SControl calling another SControl after inserting details into CObject1.

Anyone knows what's wrong ?
sasasasa
Hi All,

           The issue is resolved by appending Namespace__ to all custom objects and it's fields in all the queries

thks
Lynn